From 83723e2a7b095903e4728620487c361c9da1c029 Mon Sep 17 00:00:00 2001 From: Kris Austin Date: Fri, 7 Aug 2026 11:28:54 -0500 Subject: [PATCH] fix: Slice all crash on a multi-plate project with an uninitialized toolbar (#15117) _update_select_plate_toolbar_stats_item(true) runs from on_action_slice_all before the select-plate toolbar has necessarily been initialized. m_all_plates_stats_item is only assigned in _init_select_plate_toolbar, so slicing a multi-plate project shortly after startup (before the Preview tab has rendered) leaves the pointer null while show_stats_item is true, and the branch dereferences it, crashing with SIGSEGV. Every other dereference of this pointer already null-checks it. Add the same check here so the all-plates stats item is left unselected until the toolbar is initialized instead of crashing. Fixes #15116 --- src/slic3r/GUI/GLCanvas3D.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 27fe44a867..303f9a2b76 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -6977,7 +6977,7 @@ void GLCanvas3D::_update_select_plate_toolbar_stats_item(bool force_selected) { else m_sel_plate_toolbar.show_stats_item = false; - if (force_selected && m_sel_plate_toolbar.show_stats_item) + if (force_selected && m_sel_plate_toolbar.show_stats_item && m_sel_plate_toolbar.m_all_plates_stats_item) m_sel_plate_toolbar.m_all_plates_stats_item->selected = true; }