From 52ef5c3c40af7effaa3d67a150950961174927e2 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 3 Sep 2004 19:04:17 +0000 Subject: [PATCH] Check for m_peer != NULL in Freeze and Thaw git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/window.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 9a94b1f5a0..f24329b607 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -2133,7 +2133,8 @@ void wxWindowMac::Freeze() #if TARGET_API_MAC_OSX if ( !m_frozenness++ ) { - m_peer->SetDrawingEnabled( false ) ; + if ( m_peer && m_peer->Ok() ) + m_peer->SetDrawingEnabled( false ) ; } #endif } @@ -2146,8 +2147,11 @@ void wxWindowMac::Thaw() if ( !--m_frozenness ) { - m_peer->SetDrawingEnabled( true ) ; - m_peer->InvalidateWithChildren() ; + if ( m_peer && m_peer->Ok() ) + { + m_peer->SetDrawingEnabled( true ) ; + m_peer->InvalidateWithChildren() ; + } } #endif } -- 2.45.2