diff options
-rwxr-xr-x | plugins/Dbx_sqlite/src/dbevents.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp index 6244928107..94249e508f 100755 --- a/plugins/Dbx_sqlite/src/dbevents.cpp +++ b/plugins/Dbx_sqlite/src/dbevents.cpp @@ -33,6 +33,9 @@ void CDbxSQLite::UninitEvents() LONG CDbxSQLite::GetEventCount(MCONTACT hContact) { DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; + if (cc == nullptr) + return 0; + if (cc->HasCount()) return cc->m_count; |