summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-09-18 16:46:25 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-09-18 16:46:32 +0300
commit1ea9a557fe150c5dad274d68856b4b704877309c (patch)
tree05899d4f3d5a7e47f2663a4405e64b7ec7e5dd1b /src
parent41a7034c8a8a8c4006a9365343e769b4759934bb (diff)
fix for occasional crash in tab control
Diffstat (limited to 'src')
-rw-r--r--src/mir_core/src/CCtrlPages.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mir_core/src/CCtrlPages.cpp b/src/mir_core/src/CCtrlPages.cpp
index 1d2d08694d..86011961fb 100644
--- a/src/mir_core/src/CCtrlPages.cpp
+++ b/src/mir_core/src/CCtrlPages.cpp
@@ -373,8 +373,9 @@ void CCtrlPages::OnDestroy()
int tabCount = GetCount();
for (int i = 0; i < tabCount; i++) {
TPageInfo *p = GetItemPage(i);
- if (p->m_pDlg->GetHwnd())
- p->m_pDlg->Close();
+ CDlgBase *pDlg = p->m_pDlg; p->m_pDlg = nullptr;
+ if (pDlg->GetHwnd())
+ pDlg->Close();
delete p;
}