summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-09-18 16:58:38 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-09-18 16:58:38 +0300
commita218ab1bbf4f7c343d40c5c8a956cf6a0a769341 (patch)
tree97bd4547cef3deb8e4b28e07e15acf21e8c63a3f /src
parent1ea9a557fe150c5dad274d68856b4b704877309c (diff)
fixes #923 (database panic window in StdMsg)
Diffstat (limited to 'src')
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index aa9e5136f7..0913a19ec6 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -299,13 +299,15 @@ void CSrmmWindow::OnDestroy()
db_set_dw(hContact, SRMMMOD, "height", wp.rcNormalPosition.bottom - wp.rcNormalPosition.top);
NotifyEvent(MSG_WINDOW_EVT_CLOSE);
- if (m_hContact && g_dat.bDeleteTempCont)
- if (db_get_b(m_hContact, "CList", "NotOnList", 0))
- db_delete_contact(m_hContact);
Window_FreeIcon_IcoLib(m_hwnd);
CSuper::OnDestroy();
+
+ // a temporary contact should be destroyed after removing window from the window list to prevent recursion
+ if (m_hContact && g_dat.bDeleteTempCont)
+ if (db_get_b(m_hContact, "CList", "NotOnList", 0))
+ db_delete_contact(m_hContact);
}
/////////////////////////////////////////////////////////////////////////////////////////