summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Scriver/src')
-rw-r--r--plugins/Scriver/src/msgdialog.cpp5
-rw-r--r--plugins/Scriver/src/msglog.cpp5
2 files changed, 4 insertions, 6 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 4f65a5cd52..4c6c1f9af0 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -430,9 +430,8 @@ void CMsgDialog::onClick_Quote(CCtrlButton*)
mir_free(buffer);
}
else {
- DB::EventInfo dbei;
- dbei.cbBlob = -1;
- if (db_event_get(m_hDbEventLast, &dbei))
+ DB::EventInfo dbei(m_hDbEventLast);
+ if (!dbei)
return;
if (DbEventIsMessageOrCustom(&dbei)) {
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp
index ea8dbd2747..f191432ba4 100644
--- a/plugins/Scriver/src/msglog.cpp
+++ b/plugins/Scriver/src/msglog.cpp
@@ -78,9 +78,8 @@ bool DbEventIsShown(const DBEVENTINFO &dbei)
EventData* CMsgDialog::GetEventFromDB(MCONTACT hContact, MEVENT hDbEvent)
{
- DB::EventInfo dbei;
- dbei.cbBlob = -1;
- if (db_event_get(hDbEvent, &dbei))
+ DB::EventInfo dbei(hDbEvent);
+ if (!dbei)
return nullptr;
if (!DbEventIsShown(dbei))