diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index bd85704aad..9d20d9a04c 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -1896,6 +1896,9 @@ void wxWindowMac::GetTextExtent(const wxString& string, int *x, int *y, void wxWindowMac::Refresh(bool eraseBack, const wxRect *rect) { + if ( m_peer == NULL ) + return ; + #if TARGET_API_MAC_OSX if ( rect == NULL ) m_peer->SetNeedsDisplay( true ) ;