X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cffda6922a7a7f205389e8002d0b7558ec2d36fb..f239a20092359e3c914adb79bd39f3f5d2b2e06f:/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;