From 32cd89f64ef0449eac0ceea2ba9bc1aa36c5759b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 4 Feb 2018 16:42:23 +0300 Subject: the error code of db_event_get() should be checked --- plugins/TabSRMM/src/globals.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/TabSRMM/src') diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index e52eb2a63e..69e3799fd9 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -507,7 +507,9 @@ void CGlobals::RestoreUnreadMessageAlerts(void) for (MEVENT hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hContact, hDbEvent)) { DBEVENTINFO dbei = {}; - db_event_get(hDbEvent, &dbei); + if (db_event_get(hDbEvent, &dbei)) + continue; + if (!dbei.markedRead() && dbei.eventType == EVENTTYPE_MESSAGE) { if (Srmm_FindWindow(hContact) != nullptr) continue; -- cgit v1.2.3