From 67f28607c8638e2fc5f6fb62931ff4b2fd19c04c Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 8 Jun 2005 17:49:18 +0000 Subject: [PATCH] guard against erases during tlw window destruction git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/window.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 4bd0ab12be..bbd59ffe8c 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -2169,6 +2169,8 @@ void wxWindowMac::WarpPointer (int x_pos, int y_pos) void wxWindowMac::OnEraseBackground(wxEraseEvent& event) { + if ( MacGetTopLevelWindow() == NULL ) + return ; #if TARGET_API_MAC_OSX if ( MacGetTopLevelWindow()->MacUsesCompositing() && (m_macBackgroundBrush.Ok() == false || m_macBackgroundBrush.GetStyle() == wxTRANSPARENT ) ) { -- 2.45.2