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/Scriver/src/msgs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/Scriver/src') diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index d7c0f1ac32..e713c569cc 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -252,7 +252,8 @@ static void RestoreUnreadMessageAlerts(void) for (MEVENT hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hContact, hDbEvent)) { DBEVENTINFO dbei = {}; dbei.cbBlob = 0; - db_event_get(hDbEvent, &dbei); + if (db_event_get(hDbEvent, &dbei)) + continue; if ((dbei.flags & (DBEF_SENT | DBEF_READ)) || !DbEventIsMessageOrCustom(&dbei)) continue; -- cgit v1.2.3