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
This commit is contained in:
Stefan Csomor 2004-12-22 05:51:02 +00:00
parent 3838e2d36e
commit 66ffb23b39

View 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() ;