From 3e8c97bec22d4fe234a029e620769dd1b64c3261 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 15 Oct 2016 19:56:47 +0300 Subject: fix for CDlgBase::m_bExiting initialization --- src/mir_core/src/ui_utils.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mir_core/src/ui_utils.cpp b/src/mir_core/src/ui_utils.cpp index ff4de03f6c..dc53f9dd71 100644 --- a/src/mir_core/src/ui_utils.cpp +++ b/src/mir_core/src/ui_utils.cpp @@ -60,8 +60,7 @@ CDlgBase::CDlgBase(HINSTANCE hInst, int idDialog) m_hInst = hInst; m_idDialog = idDialog; m_hwnd = m_hwndParent = NULL; - m_isModal = false; - m_initialized = false; + m_isModal = m_initialized = m_bExiting = false; m_autoClose = CLOSE_ON_OK | CLOSE_ON_CANCEL; m_forceResizable = false; } @@ -192,6 +191,9 @@ INT_PTR CDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) NMHDR *pnmh = (NMHDR *)lParam; if (pnmh->idFrom == 0) { if (pnmh->code == PSN_APPLY) { + if (LPPSHNOTIFY(lParam)->lParam != 3) // IDC_APPLY + m_bExiting = true; + m_lresult = true; NotifyControls(&CCtrlBase::OnApply); if (m_lresult) -- cgit v1.2.3