summaryrefslogtreecommitdiff
path: root/plugins/AutoShutdown/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/AutoShutdown/src')
-rw-r--r--plugins/AutoShutdown/src/watcher.cpp5
1 files changed, 2 insertions, 3 deletions
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)) {