From ab8367efd2b59c9852318c8e9e4192bfa9c890d3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 5 Jul 2021 20:02:00 +0300 Subject: fix for occasional crash --- plugins/Dbx_sqlite/src/dbevents.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/Dbx_sqlite/src/dbevents.cpp') 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; -- cgit v1.2.3