From 1da8377f17236be6979b63087f833bf857832e5f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 30 May 2022 17:36:23 +0200 Subject: [PATCH] Declare wxBitmap in smaller scope in wxWizard DPI change handler No real changes, just avoid creating wxBitmap unnecessarily and only do it if we're really going to use it. --- src/generic/wizard.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/wizard.cpp b/src/generic/wizard.cpp index 3dfd4fb0da..69dbca06f4 100644 --- a/src/generic/wizard.cpp +++ b/src/generic/wizard.cpp @@ -904,9 +904,9 @@ void wxWizard::SetBitmap(const wxBitmapBundle& bitmap) void wxWizard::WXHandleDPIChanged(wxDPIChangedEvent& event) { - wxBitmap bmp; if ( m_statbmp ) { + wxBitmap bmp; if ( m_page ) bmp = m_page->GetBitmap(); if ( !bmp.IsOk() )