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