Fix of #10890 (crash when switching light/dark mode with Height Range Modifier active)

This commit is contained in:
Lukas Matena 2023-06-28 15:03:02 +02:00
parent 2d6d37f685
commit 4981b33b01

View File

@ -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();