CocoaRemoveFromParent can (and will) be called when !m_cocoaNSView.

However, if there is m_dummyNSView then there must be m_cocoaNSView.
Therefore, moved wxASSERT(m_cocoaNSView) inside if(m_dummyNSView)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott
2003-03-24 20:00:22 +00:00
parent 2b17e39106
commit c1f7d193f6

View File

@@ -87,9 +87,9 @@ void wxWindowCocoa::CocoaAddChild(wxWindowCocoa *child)
void wxWindowCocoa::CocoaRemoveFromParent(void)
{
wxASSERT(m_cocoaNSView);
if(m_dummyNSView)
{
wxASSERT(m_cocoaNSView);
// balances the alloc
[m_dummyNSView removeFromSuperview];
// But since we also retained it ourselves