]> git.saurik.com Git - wxWidgets.git/commitdiff
Check for m_peer != NULL in Freeze and Thaw
authorRobin Dunn <robin@alldunn.com>
Fri, 3 Sep 2004 19:04:17 +0000 (19:04 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 3 Sep 2004 19:04:17 +0000 (19:04 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/window.cpp

index 9a94b1f5a0f05c39ec392ddff8c2334330e88eb0..f24329b6076375cb7ab5a635d4501a340676aaf4 100644 (file)
@@ -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
 }