Test to avoid crashes in some circumstances

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48303 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2007-08-21 16:48:32 +00:00
parent e88f2e9e59
commit 97e7beedd4

View File

@@ -2887,7 +2887,9 @@ void wxWindowMac::ClearBackground()
void wxWindowMac::Update() void wxWindowMac::Update()
{ {
#if TARGET_API_MAC_OSX #if TARGET_API_MAC_OSX
MacGetTopLevelWindow()->MacPerformUpdates() ; wxTopLevelWindowMac* top = MacGetTopLevelWindow();
if (top)
top->MacPerformUpdates() ;
#else #else
::Draw1Control( m_peer->GetControlRef() ) ; ::Draw1Control( m_peer->GetControlRef() ) ;
#endif #endif