summaryrefslogtreecommitdiff
path: root/plugins/Variables
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-04-10 18:50:46 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-04-10 18:50:46 +0300
commit90ac4c689e1322b48f6ca53a0c8fff81daf73c9c (patch)
tree63e000a99864d819650634fe8a7fa8b2be0cd1d2 /plugins/Variables
parent79ac0acda98f8f7a34bde30b7720a11c04281cb4 (diff)
code cleaning
Diffstat (limited to 'plugins/Variables')
-rw-r--r--plugins/Variables/src/parse_miranda.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp
index 72cf34604e..8996cbbc46 100644
--- a/plugins/Variables/src/parse_miranda.cpp
+++ b/plugins/Variables/src/parse_miranda.cpp
@@ -564,12 +564,8 @@ static wchar_t* parseDbEvent(ARGUMENTSINFO *ai)
if (hDbEvent == NULL)
return nullptr;
- DB::EventInfo dbe;
- dbe.cbBlob = -1;
- if (db_event_get(hDbEvent, &dbe))
- return nullptr;
-
- return DbEvent_GetTextW(&dbe, CP_ACP);
+ DB::EventInfo dbe(hDbEvent);
+ return (dbe) ? DbEvent_GetTextW(&dbe, CP_ACP) : nullptr;
}
static wchar_t* parseTranslate(ARGUMENTSINFO *ai)