From 97502df924cb89209ef559d8ca18171eabf9ea16 Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Thu, 9 Nov 2023 22:22:43 +0800 Subject: [PATCH] Fix cli segfault (#2661) (#2665) --- src/slic3r/GUI/PartPlate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp index bd86ceaa3db..d07895b3de1 100644 --- a/src/slic3r/GUI/PartPlate.cpp +++ b/src/slic3r/GUI/PartPlate.cpp @@ -459,7 +459,7 @@ void PartPlate::calc_vertex_for_icons(int index, GeometryBuffer &buffer) ExPolygon poly; auto bed_ext = get_extents(m_shape); Vec2d p = bed_ext[2]; - if (m_plater->get_build_volume_type() == BuildVolume_Type::Circle) + if (m_plater && m_plater->get_build_volume_type() == BuildVolume_Type::Circle) p[1] -= std::max( 0.0, (bed_ext.size()(1) - 5 * PARTPLATE_ICON_SIZE - 4 * PARTPLATE_ICON_GAP_Y - PARTPLATE_ICON_GAP_TOP) / 2);