From 52bc770ebf3f5e28044c82108ef071876afb32d3 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 28 Jun 2023 15:03:02 +0200 Subject: [PATCH] Fix of #10890 (crash when switching light/dark mode with Height Range Modifier active) --- src/slic3r/GUI/GUI_ObjectLayers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GUI_ObjectLayers.cpp b/src/slic3r/GUI/GUI_ObjectLayers.cpp index 6f6ec523808..4727c6d30b1 100644 --- a/src/slic3r/GUI/GUI_ObjectLayers.cpp +++ b/src/slic3r/GUI/GUI_ObjectLayers.cpp @@ -283,7 +283,7 @@ void ObjectLayers::sys_color_changed() if (item->IsSizer()) {// case when we have editor with buttons for (size_t btn : {2, 3}) { // del_btn, add_btn wxSizerItem* b_item = item->GetSizer()->GetItem(btn); - if (b_item->IsWindow()) { + if (b_item && b_item->IsWindow()) { auto button = dynamic_cast(b_item->GetWindow()); if (button != nullptr) button->sys_color_changed();