]> git.saurik.com Git - wxWidgets.git/commitdiff
CocoaRemoveFromParent can (and will) be called when !m_cocoaNSView.
authorDavid Elliott <dfe@tgwbd.org>
Mon, 24 Mar 2003 20:00:22 +0000 (20:00 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Mon, 24 Mar 2003 20:00:22 +0000 (20:00 +0000)
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

src/cocoa/window.mm

index 85b60e41a935ce1327a4662b0436d089ea658076..92adb08bc4a085252cb11c5712dcaaffe36e1555 100644 (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