]> git.saurik.com Git - wxWidgets.git/commitdiff
initialize wxDocChildFrameAnyBase before creating the real window to ensure that...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 22 May 2009 22:46:18 +0000 (22:46 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 22 May 2009 22:46:18 +0000 (22:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/docview.h

index d3e109eb60544e7a771af5d28775e32def68bdad..0ac6cdcb3e4d931037a17c7c9100a1fde3d7bcba 100644 (file)
@@ -521,7 +521,12 @@ class WXDLLIMPEXP_CORE wxDocChildFrameAnyBase
 {
 public:
     // default ctor, use Create() after it
-    wxDocChildFrameAnyBase() { m_win = NULL; }
+    wxDocChildFrameAnyBase()
+    {
+        m_childDocument = NULL;
+        m_childView = NULL;
+        m_win = NULL;
+    }
 
     // full ctor equivalent to using the default one and Create(0
     wxDocChildFrameAnyBase(wxDocument *doc, wxView *view, wxWindow *win)
@@ -631,10 +636,10 @@ public:
                 long style = wxDEFAULT_FRAME_STYLE,
                 const wxString& name = wxFrameNameStr)
     {
-        if ( !BaseClass::Create(parent, id, title, pos, size, style, name) )
+        if ( !wxDocChildFrameAnyBase::Create(doc, view, this) )
             return false;
 
-        if ( !wxDocChildFrameAnyBase::Create(doc, view, this) )
+        if ( !BaseClass::Create(parent, id, title, pos, size, style, name) )
             return false;
 
         this->Connect(wxEVT_ACTIVATE,