From c1b58d2c51f390e79c0b179f63f2e249201208f2 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 26 Jan 2023 12:30:24 +0100 Subject: [PATCH] Fixed a crash on a changing of the application scale --- src/slic3r/GUI/Tab.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 3a69bcee14..43eaa1a22d 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2190,10 +2190,9 @@ void TabFilament::clear_pages() void TabFilament::msw_rescale() { - for (const auto& over_opt : m_overrides_options) { - wxWindow* win = over_opt.second; - win->SetInitialSize(win->GetBestSize()); - } + for (const auto& over_opt : m_overrides_options) + if (wxWindow* win = over_opt.second) + win->SetInitialSize(win->GetBestSize()); Tab::msw_rescale(); }