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
This commit is contained in:
Stefan Csomor
2011-03-22 16:39:26 +00:00
parent a3b89fa936
commit 869aa41b51

View File

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