diff options
-rwxr-xr-x | plugins/Dbx_sqlite/src/dbevents.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Dbx_sqlite/src/dbevents.cpp b/plugins/Dbx_sqlite/src/dbevents.cpp index 4fa873adaf..617a90e13a 100755 --- a/plugins/Dbx_sqlite/src/dbevents.cpp +++ b/plugins/Dbx_sqlite/src/dbevents.cpp @@ -513,7 +513,7 @@ MEVENT CDbxSQLite::FindNextEvent(MCONTACT hContact, MEVENT hDbEvent) if (hDbEvent == 0) return 0; - DBCachedContact *cc = m_cache->GetCachedContact(hContact); + DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; if (cc == nullptr) return 0; @@ -562,7 +562,7 @@ MEVENT CDbxSQLite::FindPrevEvent(MCONTACT hContact, MEVENT hDbEvent) if (hDbEvent == 0) return 0; - DBCachedContact *cc = m_cache->GetCachedContact(hContact); + DBCachedContact *cc = (hContact) ? m_cache->GetCachedContact(hContact) : &m_system; if (cc == nullptr) return 0; |