From 869aa41b519f2ef00d50fd12b0c2ea9867bddc6e Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Tue, 22 Mar 2011 16:39:26 +0000 Subject: [PATCH] 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 --- src/osx/window_osx.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.50.0