]> git.saurik.com Git - wxWidgets.git/commitdiff
only remove from parent if not content view, fixes #13068
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 22 Mar 2011 16:39:26 +0000 (16:39 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 22 Mar 2011 16:39:26 +0000 (16:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/window_osx.cpp

index 8f6d0e6629c9ff1b637dba3c5a983c37cb241fe4..c24fb9b151ee3eff5418610e765f4184e8357faa 100644 (file)
@@ -298,7 +298,8 @@ void wxWindowMac::SetPeer(wxOSXWidgetImpl* peer)
 {
     if ( GetPeer() )
     {
-        GetPeer()->RemoveFromParent();
+        if ( !GetPeer()->IsRootControl() )
+            GetPeer()->RemoveFromParent();
         wxDELETE(m_peer);
     }