diff --git a/src/db/main-db.cpp b/src/db/main-db.cpp index 248c681a9..dbb36717a 100644 --- a/src/db/main-db.cpp +++ b/src/db/main-db.cpp @@ -1256,13 +1256,11 @@ template static T getValueFromRow (const soci::row &row, int index, bool &isNull) { isNull = false; - try { - return row.get(size_t(index)); - } catch (const exception &) { + if (row.get_indicator(size_t(index)) == soci::i_null){ isNull = true; + return T(); } - - return T(); + return row.get(size_t(index)); } // -----------------------------------------------------------------------------