summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/globals.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-04 16:42:23 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-04 16:42:23 +0300
commit32cd89f64ef0449eac0ceea2ba9bc1aa36c5759b (patch)
tree5cb92407bb71893399210adb0d8dadcc53ab6dd6 /plugins/TabSRMM/src/globals.cpp
parent60a76a56531ceb2bb6d03add1de32ceeef832be9 (diff)
the error code of db_event_get() should be checked
Diffstat (limited to 'plugins/TabSRMM/src/globals.cpp')
-rw-r--r--plugins/TabSRMM/src/globals.cpp4
1 files changed, 3 insertions, 1 deletions
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;