diff options
author | aunsane <aunsane@gmail.com> | 2018-09-27 22:37:02 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-09-27 22:37:15 +0300 |
commit | 39fdc50b018c989f22c5392aca11da5fc5a482aa (patch) | |
tree | 65b69bbff2d95d8a407e38ae48f96901332b1592 /plugins/Dbx_sqlite/src/dbcontacts.cpp | |
parent | cb3f9df94ba93527b8c589346b7b4482abad0fae (diff) |
dbx_sqlite: correct event sorting
Diffstat (limited to 'plugins/Dbx_sqlite/src/dbcontacts.cpp')
-rw-r--r-- | plugins/Dbx_sqlite/src/dbcontacts.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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; |