From 90ac4c689e1322b48f6ca53a0c8fff81daf73c9c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Apr 2023 18:50:46 +0300 Subject: code cleaning --- plugins/AutoShutdown/src/watcher.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins/AutoShutdown/src') diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp index 17ced0e11a..271e619180 100644 --- a/plugins/AutoShutdown/src/watcher.cpp +++ b/plugins/AutoShutdown/src/watcher.cpp @@ -64,9 +64,8 @@ static void __inline ShutdownAndStopWatcher(void) static int MsgEventAdded(WPARAM, LPARAM hDbEvent) { if (currentWatcherType & SDWTF_MESSAGE) { - DB::EventInfo dbei; - dbei.cbBlob = -1; - if (db_event_get(hDbEvent, &dbei)) + DB::EventInfo dbei(hDbEvent); + if (!dbei) return 0; if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT)) { -- cgit v1.2.3