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
This commit is contained in:
Vadim Zeitlin
2014-09-14 00:59:48 +00:00
parent 8474dc6489
commit da5edc0fc1

View File

@@ -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 )
{