]> git.saurik.com Git - wxWidgets.git/commitdiff
don't assert in Refresh() if window is not created yet, simply return without doing...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 23 Mar 2009 15:59:37 +0000 (15:59 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 23 Mar 2009 15:59:37 +0000 (15:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59780 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp

index fb13c32ec2ddf06a7a1e8f6e580a1ad645065b1f..845268de6727f481a1f0a39ecbf287c81aaa5e96 100644 (file)
@@ -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)
     {