From da5edc0fc1649cd7fb19b5efc75b755da83ee3a7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 14 Sep 2014 00:59:48 +0000 Subject: [PATCH] Fix crash in wxMDIParentFrame dtor after taskbar branch merge. wxFrame::m_taskBarButton needs to be initialized in its Init(), not Create(), which is not necessarily used by the derived classes such as wxMDIParentFrame, resulting in a guaranteed crash when deleting an uninitialized pointer later in wxFrame dtor. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/frame.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 6921a46659..9e1090e929 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -114,6 +114,10 @@ void wxFrame::Init() #endif m_wasMinimized = false; + +#if wxUSE_TASKBARBUTTON + m_taskBarButton = NULL; +#endif } bool wxFrame::Create(wxWindow *parent, @@ -143,7 +147,6 @@ bool wxFrame::Create(wxWindow *parent, #endif // wxUSE_ACCEL && __POCKETPC__ #if wxUSE_TASKBARBUTTON - m_taskBarButton = NULL; static bool s_taskbarButtonCreatedMsgRegistered = false; if ( !s_taskbarButtonCreatedMsgRegistered ) {