X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a6384ca1e6e9a84f755dbca28875a5e89267766..b796ba39311830b11e375de10ca2378f501c5b8c:/src/generic/mdig.cpp diff --git a/src/generic/mdig.cpp b/src/generic/mdig.cpp index b6a043aad3..d97213d797 100644 --- a/src/generic/mdig.cpp +++ b/src/generic/mdig.cpp @@ -120,11 +120,12 @@ bool wxGenericMDIParentFrame::Create(wxWindow *parent, #endif // wxUSE_MENUS } - wxFrame::Create( parent, id, title, pos, size, style, name ); + if ( !wxFrame::Create( parent, id, title, pos, size, style, name ) ) + return false; - OnCreateClient(); + m_pClientWindow = OnCreateClient(); - return true; + return m_pClientWindow != NULL; } #if wxUSE_MENUS @@ -248,11 +249,10 @@ wxGenericMDIClientWindow *wxGenericMDIParentFrame::GetClientWindow() const wxGenericMDIClientWindow *wxGenericMDIParentFrame::OnCreateClient() { #if wxUSE_GENERIC_MDI_AS_NATIVE - m_pClientWindow = new wxMDIClientWindow( this ); + return new wxMDIClientWindow( this ); #else - m_pClientWindow = new wxGenericMDIClientWindow( this ); + return new wxGenericMDIClientWindow( this ); #endif - return m_pClientWindow; } void wxGenericMDIParentFrame::ActivateNext() @@ -816,4 +816,5 @@ IMPLEMENT_DYNAMIC_CLASS(wxMDIClientWindow, wxGenericMDIClientWindow) #endif // wxUSE_GENERIC_MDI_AS_NATIVE -#endif // wxUSE_MDI \ No newline at end of file +#endif // wxUSE_MDI +