Fixed a crash when trying to delete a wipe tower with the delete key.

This commit is contained in:
bubnikv 2018-12-18 19:12:59 +01:00
parent bb5caf2e08
commit 76c922bf9a

View file

@ -982,6 +982,10 @@ void ObjectList::del_instances_from_object(const int obj_idx)
bool ObjectList::del_subobject_from_object(const int obj_idx, const int idx, const int type)
{
if (obj_idx == 1000)
// Cannot delete a wipe tower.
return false;
if (type == itVolume) {
const auto volume = (*m_objects)[obj_idx]->volumes[idx];