From 2c899c2010e0ee7c1ac75b36251c886433400aa2 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 17 Oct 2004 11:51:43 +0000 Subject: [PATCH] guard against m_peer = NULL in Show() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/window.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index f33b1a2a3d..8d5f618255 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -1868,11 +1868,14 @@ bool wxWindowMac::Show(bool show) return FALSE; // TODO use visibilityChanged Carbon Event for OSX - bool former = MacIsReallyShown() ; + if ( m_peer ) + { + bool former = MacIsReallyShown() ; - m_peer->SetVisibility( show , true ) ; - if ( former != MacIsReallyShown() ) - MacPropagateVisibilityChanged() ; + m_peer->SetVisibility( show , true ) ; + if ( former != MacIsReallyShown() ) + MacPropagateVisibilityChanged() ; + } return TRUE; } -- 2.45.2