Skip to content

Commit

Permalink
Fix of #10890 (crash when switching light/dark mode with Height Range…
Browse files Browse the repository at this point in the history
… Modifier active)
  • Loading branch information
lukasmatena committed Jun 30, 2023
1 parent 2d6d37f commit 4981b33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/slic3r/GUI/GUI_ObjectLayers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<PlusMinusButton*>(b_item->GetWindow());
if (button != nullptr)
button->sys_color_changed();
Expand Down

0 comments on commit 4981b33

Please sign in to comment.