Fix crash in wxAizrd on DPI change before adding the first page

Fix a problem introduced in 429b5561ff (Use wxBitmapBundle in wxWizard,
2022-02-10), see #22124, by adding a check for the current page being
non-null before using it.

Closes #22471.
This commit is contained in:
Vadim Zeitlin 2022-05-30 17:34:46 +02:00
parent 0b33e08dfe
commit c3359c17b7

View File

@ -907,7 +907,8 @@ void wxWizard::WXHandleDPIChanged(wxDPIChangedEvent& event)
wxBitmap bmp;
if ( m_statbmp )
{
bmp = m_page->GetBitmap();
if ( m_page )
bmp = m_page->GetBitmap();
if ( !bmp.IsOk() )
bmp = m_bitmap.GetBitmapFor(this);