From b4857be372c690e34d4c54ad11c41429b84e9384 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 23 Mar 2009 15:59:37 +0000 Subject: [PATCH] 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 --- src/gtk/window.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index fb13c32..845268d 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) { -- 2.7.4