diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index b47519429c..f593e71c7d 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -2887,7 +2887,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