making sure we don't say we are visible while in destruction
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 22 Dec 2004 05:51:02 +0000 (05:51 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 22 Dec 2004 05:51:02 +0000 (05:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/window.cpp

index 313f6f0b19be708f98b039b3b85ac31450754d70..84720504652ed5613fdb91fbb02c81eade27e80a 100644 (file)
@@ -2018,6 +2018,9 @@ void wxWindowMac::MacEnabledStateChanged()
 bool wxWindowMac::MacIsReallyShown()
 {
     // only under OSX the visibility of the TLW is taken into account
+    if ( m_isBeingDeleted )
+        return false ;
+        
 #if TARGET_API_MAC_OSX
     if ( m_peer && m_peer->Ok() )
         return m_peer->IsVisible();
@@ -2731,7 +2734,7 @@ wxRegion wxWindowMac::MacGetVisibleRegion( bool includeOuterStructures )
     Rect r ;
     RgnHandle visRgn = NewRgn() ;
     RgnHandle tempRgn = NewRgn() ;
-    if ( m_peer->IsVisible())
+    if ( !m_isBeingDeleted && m_peer->IsVisible())
     {
         m_peer->GetRect( &r ) ;
         r.left -= MacGetLeftBorderSize() ;