X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cffda6922a7a7f205389e8002d0b7558ec2d36fb..abd474ea63667f727940a009cc3e0b23ba9f418f:/src/ribbon/page.cpp diff --git a/src/ribbon/page.cpp b/src/ribbon/page.cpp index fed553be37..3448462420 100644 --- a/src/ribbon/page.cpp +++ b/src/ribbon/page.cpp @@ -415,9 +415,12 @@ void wxRibbonPage::OnSize(wxSizeEvent& evt) { 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;