diff --git a/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp b/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp index 07ed8450e2..6b4f00a8cd 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp @@ -131,7 +131,7 @@ void GLGizmoHollow::on_render() const void GLGizmoHollow::render_clipping_plane(const Selection& selection) const { - if (m_clipping_plane_distance == 0.f) + if (m_clipping_plane_distance == 0.f || mesh()->empty()) return; // Get transformation of the instance @@ -172,7 +172,7 @@ void GLGizmoHollow::render_clipping_plane(const Selection& selection) const if (m_print_object_idx >= 0) { const SLAPrintObject* print_object = m_parent.sla_print()->objects()[m_print_object_idx]; - if (print_object->is_step_done(slaposSupportTree)) { + if (print_object->is_step_done(slaposSupportTree) && !print_object->get_mesh(slaposSupportTree).empty()) { // If the supports are already calculated, save the timestamp of the respective step // so we can later tell they were recalculated. size_t timestamp = print_object->step_state_with_timestamp(slaposSupportTree).timestamp; diff --git a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp index 9d8b7687c6..ac3dd80589 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp @@ -136,7 +136,7 @@ void GLGizmoSlaSupports::on_render() const void GLGizmoSlaSupports::render_clipping_plane(const Selection& selection) const { - if (m_clipping_plane_distance == 0.f) + if (m_clipping_plane_distance == 0.f || m_mesh->empty()) return; // Get transformation of the instance @@ -177,7 +177,7 @@ void GLGizmoSlaSupports::render_clipping_plane(const Selection& selection) const if (m_print_object_idx >= 0) { const SLAPrintObject* print_object = m_parent.sla_print()->objects()[m_print_object_idx]; - if (print_object->is_step_done(slaposSupportTree)) { + if (print_object->is_step_done(slaposSupportTree) && !print_object->get_mesh(slaposSupportTree).empty()) { // If the supports are already calculated, save the timestamp of the respective step // so we can later tell they were recalculated. size_t timestamp = print_object->step_state_with_timestamp(slaposSupportTree).timestamp;