diff options
-rw-r--r-- | src/dal/sqlitedataprovider.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dal/sqlitedataprovider.cpp b/src/dal/sqlitedataprovider.cpp index 6abfb59c..463abd7e 100644 --- a/src/dal/sqlitedataprovider.cpp +++ b/src/dal/sqlitedataprovider.cpp @@ -402,7 +402,9 @@ const RecordSet& SqLiteDataProvider::processSql() for (int col = 0; col < totalCols; ++col) { fieldNames.push_back(sqlite3_column_name(mStmt, col)); - r.push_back((char*)sqlite3_column_text(mStmt, col)); + const unsigned char *txt = sqlite3_column_text(mStmt, col); + r.push_back(txt ? (char*)txt : ""); + } // ensure we set column headers before adding a row mRecordSet.setColumnHeaders(fieldNames); |