X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b4ca59760ed6f9c22c1bd73c9f4aad3403b0f840..3e1924dd5f5744c3e2a8973de9b3e4f372b7fd85:/src/generic/mdig.cpp diff --git a/src/generic/mdig.cpp b/src/generic/mdig.cpp index a1cdc3b089..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()