From: Stefan Csomor Date: Tue, 13 Apr 2010 15:07:40 +0000 (+0000) Subject: making sure calls don't crash for fully native dialogs which don't have a nowpeer... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/aa47eebb1b2a2213830fe81e819eca2b02c72776 making sure calls don't crash for fully native dialogs which don't have a nowpeer like filedialog git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/toplevel_osx.cpp b/src/osx/toplevel_osx.cpp index 16c88a85d8..785a0e10c2 100644 --- a/src/osx/toplevel_osx.cpp +++ b/src/osx/toplevel_osx.cpp @@ -114,6 +114,9 @@ void wxTopLevelWindowMac::Maximize(bool maximize) bool wxTopLevelWindowMac::IsMaximized() const { + if ( m_nowpeer == NULL ) + return false; + return m_nowpeer->IsMaximized(); } @@ -125,6 +128,9 @@ void wxTopLevelWindowMac::Iconize(bool iconize) bool wxTopLevelWindowMac::IsIconized() const { + if ( m_nowpeer == NULL ) + return false; + return m_nowpeer->IsIconized(); }