]> git.saurik.com Git - wxWidgets.git/blobdiff - src/ribbon/page.cpp
Fix typo in last commit
[wxWidgets.git] / src / ribbon / page.cpp
index fed553be373e03b6639ecc8b085d558c1dcbc5e5..3448462420b4bfe709af4b5a3c81e97e2f127818 100644 (file)
@@ -415,9 +415,12 @@ void wxRibbonPage::OnSize(wxSizeEvent& evt)
 {
     wxSize new_size = evt.GetSize();
 
 {
     wxSize new_size = evt.GetSize();
 
-    wxMemoryDC temp_dc;
-    wxRect invalid_rect = m_art->GetPageBackgroundRedrawArea(temp_dc, this, m_old_size, new_size);
-    Refresh(true, &invalid_rect);
+    if (m_art)
+    {
+        wxMemoryDC temp_dc;
+        wxRect invalid_rect = m_art->GetPageBackgroundRedrawArea(temp_dc, this, m_old_size, new_size);
+        Refresh(true, &invalid_rect);
+    }
 
     m_old_size = new_size;
 
 
     m_old_size = new_size;