]> git.saurik.com Git - wxWidgets.git/commitdiff
Test to avoid crashes in some circumstances
authorJulian Smart <julian@anthemion.co.uk>
Tue, 21 Aug 2007 16:48:55 +0000 (16:48 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 21 Aug 2007 16:48:55 +0000 (16:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/window.cpp

index 56d06a2612a666cc42619e312ebcbe1ca1f4623c..9d32605485993c81ad7af2b639b107fbfb589826 100644 (file)
@@ -2832,7 +2832,9 @@ void wxWindowMac::ClearBackground()
 void wxWindowMac::Update()
 {
 #if TARGET_API_MAC_OSX
-    MacGetTopLevelWindow()->MacPerformUpdates() ;
+    wxTopLevelWindowMac* top = MacGetTopLevelWindow();
+    if (top)
+        top->MacPerformUpdates() ;
 #else
     ::Draw1Control( m_peer->GetControlRef() ) ;
 #endif