From: Stefan Csomor Date: Tue, 22 Mar 2011 16:39:26 +0000 (+0000) Subject: only remove from parent if not content view, fixes #13068 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/869aa41b519f2ef00d50fd12b0c2ea9867bddc6e only remove from parent if not content view, fixes #13068 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/window_osx.cpp b/src/osx/window_osx.cpp index 8f6d0e6629..c24fb9b151 100644 --- a/src/osx/window_osx.cpp +++ b/src/osx/window_osx.cpp @@ -298,7 +298,8 @@ void wxWindowMac::SetPeer(wxOSXWidgetImpl* peer) { if ( GetPeer() ) { - GetPeer()->RemoveFromParent(); + if ( !GetPeer()->IsRootControl() ) + GetPeer()->RemoveFromParent(); wxDELETE(m_peer); }