From 39fdc50b018c989f22c5392aca11da5fc5a482aa Mon Sep 17 00:00:00 2001 From: aunsane Date: Thu, 27 Sep 2018 22:37:02 +0300 Subject: dbx_sqlite: correct event sorting --- plugins/Dbx_sqlite/src/dbcontacts.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/Dbx_sqlite/src/dbcontacts.cpp') diff --git a/plugins/Dbx_sqlite/src/dbcontacts.cpp b/plugins/Dbx_sqlite/src/dbcontacts.cpp index f181420cb4..2bcc0027c8 100644 --- a/plugins/Dbx_sqlite/src/dbcontacts.cpp +++ b/plugins/Dbx_sqlite/src/dbcontacts.cpp @@ -55,7 +55,7 @@ LONG CDbxSQLite::GetContactCount() { mir_cslock lock(m_csDbAccess); sqlite3_stmt *stmt = ctc_stmts_prep[SQL_CTC_STMT_COUNT]; - int rc = sqlite3_step(stmt); + sqlite3_step(stmt); int count = sqlite3_column_int(stmt, 0); sqlite3_reset(stmt); return count; @@ -75,6 +75,8 @@ MCONTACT CDbxSQLite::AddContact() } DBCachedContact *cc = m_cache->AddContactToCache(hContact); + if (cc == nullptr) + return INVALID_CONTACT_ID; NotifyEventHooks(hContactAddedEvent, hContact); return hContact; -- cgit v1.2.3