From: Julian Smart Date: Tue, 21 Aug 2007 16:48:55 +0000 (+0000) Subject: Test to avoid crashes in some circumstances X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5bcdf503fa91515103271d457c34e75391227373 Test to avoid crashes in some circumstances git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 56d06a2612..9d32605485 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -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