summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/msgdialog.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-11-28 13:02:52 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-11-28 13:02:52 +0300
commit0759aacd40cb8e2f2de47634a6043d8a1c35dcda (patch)
tree3d27f39edf931bcecc0fb78df562d493fd521df9 /plugins/Scriver/src/msgdialog.cpp
parent51e27d7122c871c253b7a183da8ac8720f0f2ea7 (diff)
crash fix for recursive contact deletion in Scriver
Diffstat (limited to 'plugins/Scriver/src/msgdialog.cpp')
-rw-r--r--plugins/Scriver/src/msgdialog.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 6d1bd4afe1..162b22b7de 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -410,9 +410,12 @@ void CSrmmWindow::OnDestroy()
DeleteObject(hFont);
db_set_b(m_hContact, SRMM_MODULE, "UseRTL", m_bUseRtl);
- if (m_hContact && (g_dat.flags & SMF_DELTEMP))
+ if (m_hContact && (g_dat.flags & SMF_DELTEMP)) {
+ m_hContact = INVALID_CONTACT_ID; // to prevent recursion
+
if (db_get_b(m_hContact, "CList", "NotOnList", 0))
db_delete_contact(m_hContact);
+ }
SendMessage(m_hwndParent, CM_REMOVECHILD, 0, (LPARAM)m_hwnd);
if (m_hwndIeview != nullptr) {