]> git.saurik.com Git - wxWidgets.git/blobdiff - src/aui/tabmdi.cpp
don't assign the returned value in wxMDIParentFrame::OnCreateClient() to any member...
[wxWidgets.git] / src / aui / tabmdi.cpp
index ccf9e885f51d37b9f06b80ef977b4d3af9a695a1..f5057af3baa1fb2b9b476203bca31ec9be58a6d8 100644 (file)
@@ -110,9 +110,11 @@ bool wxAuiMDIParentFrame::Create(wxWindow *parent,
     }
 #endif // wxUSE_MENUS
 
-    wxFrame::Create(parent, id, title, pos, size, style, name);
-    OnCreateClient();
-    return true;
+    if ( !wxFrame::Create(parent, id, title, pos, size, style, name) )
+        return false;
+
+    m_pClientWindow = OnCreateClient();
+    return m_pClientWindow != NULL;
 }
 
 
@@ -252,8 +254,7 @@ wxAuiMDIClientWindow *wxAuiMDIParentFrame::GetClientWindow() const
 
 wxAuiMDIClientWindow *wxAuiMDIParentFrame::OnCreateClient()
 {
-    m_pClientWindow = new wxAuiMDIClientWindow( this );
-    return m_pClientWindow;
+    return new wxAuiMDIClientWindow( this );
 }
 
 void wxAuiMDIParentFrame::ActivateNext()