Fixed crash when selecting wipe tower

This commit is contained in:
Enrico Turri 2018-12-07 09:00:17 +01:00
parent 0eba32bb0c
commit 20cff0f630

View file

@ -1383,7 +1383,7 @@ bool GLCanvas3D::Selection::is_single_full_instance() const
return false;
int object_idx = m_valid ? get_object_idx() : -1;
if (object_idx == -1)
if ((object_idx < 0) || ((int)m_model->objects.size() < object_idx))
return false;
int instance_idx = (*m_volumes)[*m_list.begin()]->instance_idx();