diff --git a/gb.db.sqlite3/src/main.cpp b/gb.db.sqlite3/src/main.cpp index 869d04117..9351786d1 100644 --- a/gb.db.sqlite3/src/main.cpp +++ b/gb.db.sqlite3/src/main.cpp @@ -334,7 +334,8 @@ static int do_query(DB_DATABASE *db, const char *error, Dataset **pres, const ch if (success) { - *pres = res; + if (pres) + *pres = res; break; }