summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-07-05 20:02:00 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-07-05 20:02:00 +0300
commitab8367efd2b59c9852318c8e9e4192bfa9c890d3 (patch)
tree1999903bff77adecbd2d4d9b8d82a9f9a5221bae
parent75ba86d85ea8556b03879538ed91391890efd472 (diff)
fix for occasional crash
-rwxr-xr-xplugins/Dbx_sqlite/src/dbevents.cpp3
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;