diff options
author | George Hazan <ghazan@miranda.im> | 2021-07-05 20:02:00 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-07-05 20:02:00 +0300 |
commit | ab8367efd2b59c9852318c8e9e4192bfa9c890d3 (patch) | |
tree | 1999903bff77adecbd2d4d9b8d82a9f9a5221bae | |
parent | 75ba86d85ea8556b03879538ed91391890efd472 (diff) |
fix for occasional crash
-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; |