From: Vadim Zeitlin Date: Mon, 23 Mar 2009 15:59:37 +0000 (+0000) Subject: don't assert in Refresh() if window is not created yet, simply return without doing... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b4857be372c690e34d4c54ad11c41429b84e9384 don't assert in Refresh() if window is not created yet, simply return without doing anything (fixes crash on startup in the aui sample introduced by r59394) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index fb13c32ec2..845268de67 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3529,7 +3529,12 @@ bool wxWindowGTK::ScrollPages(int pages) void wxWindowGTK::Refresh(bool WXUNUSED(eraseBackground), const wxRect *rect) { - wxCHECK_RET( (m_widget != NULL), wxT("invalid window") ); + if ( !m_widget ) + { + // it is valid to call Refresh() for a window which hasn't been created + // yet, it simply doesn't do anything in this case + return; + } if (!m_wxwindow) {