Be robust against some objects not having an extruder assigned

This could happen for instance when a plug-in adds a model.

Fixes Sentry issue CURA-GR.
This commit is contained in:
Ghostkeeper 2020-04-09 12:55:07 +02:00
parent d5166030d7
commit 953630ad0b
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -274,7 +274,9 @@ class BuildVolume(SceneNode):
if not self._global_container_stack.extruderList[int(extruder_position)].isEnabled:
node.setOutsideBuildArea(True)
continue
except IndexError:
except IndexError: # Happens when the extruder list is too short. We're not done building the printer in memory yet.
continue
except TypeError: # Happens when extruder_position is None. This object has no extruder decoration.
continue
node.setOutsideBuildArea(False)