summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xplugins/Dbx_sqlite/src/dbevents.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp
index 42574318bd..bef40881e8 100755
--- a/plugins/Dbx_sqlite/src/dbevents.cpp
+++ b/plugins/Dbx_sqlite/src/dbevents.cpp
@@ -745,13 +745,15 @@ CDbxSQLiteEventCursor::~CDbxSQLiteEventCursor()
}
MEVENT CDbxSQLiteEventCursor::FetchNext()
{
+ if (!cursor)
+ return 0;
int rc = sqlite3_step(cursor);
assert(rc == SQLITE_ROW || rc == SQLITE_DONE);
if (rc != SQLITE_ROW) {
//empty response
//reset sql cursor
sqlite3_reset(cursor);
- cursor = 0;
+ cursor = nullptr;
return 0;
}
return sqlite3_column_int64(cursor, 0);