From 582f51cdfd9360cf81dc82843a838faf7a87b4dd Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Fri, 24 Mar 2023 08:36:43 +0100 Subject: [PATCH] Fixed crash when opening Emboss Gizmo pressing 'T' key after slicing an object using SLA printer --- src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp index dd18cb878..a4ba6de32 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp @@ -3444,7 +3444,7 @@ void priv::find_closest_volume(const Selection &selection, for (unsigned int id : indices) { const GLVolume *gl_volume = selection.get_volume(id); const ModelVolume *volume = get_model_volume(*gl_volume, objects); - if (!volume->is_model_part()) continue; + if (volume == nullptr || !volume->is_model_part()) continue; Slic3r::Polygon hull = CameraUtils::create_hull2d(camera, *gl_volume); Vec2d c = hull.centroid().cast(); Vec2d d = c - screen_center;