From 5bcdf503fa91515103271d457c34e75391227373 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 21 Aug 2007 16:48:55 +0000 Subject: [PATCH] Test to avoid crashes in some circumstances git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/window.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.45.2