From 66ffb23b392a7d02e080fdefc61b87cfe84d6df4 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 22 Dec 2004 05:51:02 +0000 Subject: [PATCH] making sure we don't say we are visible while in destruction git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31109 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/window.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 313f6f0b19..8472050465 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -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() ; -- 2.47.2