From 0874aabf6feca47d6be16959f71311002677ee80 Mon Sep 17 00:00:00 2001 From: yw4z Date: Wed, 28 Jan 2026 03:13:51 +0300 Subject: [PATCH] add safe guard --- src/slic3r/GUI/Plater.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index e6603bd6123..0ccb93bb577 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1717,7 +1717,9 @@ Sidebar::Sidebar(Plater *parent) // ORCA: FIX crash on wxGTK, directly modifying UI (self->Hide() / parent->Layout()) inside a button event can crash because callbacks are not re-entrant, leaving widgets in an inconsistent state wxGetApp().CallAfter([this, panel_color]() { // ORCA clicking edit button not triggers wxEVT_KILL_FOCUS wxEVT_LEAVE_WINDOW make changes manually to prevent stucked colors when opening printer settings - p->panel_printer_preset->SetBorderColor(panel_color.bd_normal); + if (!p || !p->panel_printer_preset || !p->btn_edit_printer) + return; + p->panel_printer_preset->SetBorderColor(panel_color.bd_normal); p->btn_edit_printer->Hide(); p->panel_printer_preset->Layout(); });