SLA gizmo fix: occasional crashes after deleting objects

This commit is contained in:
Lukas Matena 2019-03-29 13:38:33 +01:00
parent 49fe8a9f08
commit 32ed064797

View File

@ -44,8 +44,11 @@ bool GLGizmoSlaSupports::on_init()
void GLGizmoSlaSupports::set_sla_support_data(ModelObject* model_object, const Selection& selection) void GLGizmoSlaSupports::set_sla_support_data(ModelObject* model_object, const Selection& selection)
{ {
if (selection.is_empty()) if (selection.is_empty()) {
m_model_object = nullptr;
m_old_model_object = nullptr;
return; return;
}
m_old_model_object = m_model_object; m_old_model_object = m_model_object;
m_model_object = model_object; m_model_object = model_object;