Check if dict has key before accessing in BuildVolume

This commit is contained in:
Lipu Fei 2018-08-20 13:19:49 +02:00
parent 4b5cc59508
commit 1468ac1d59

View file

@ -242,6 +242,8 @@ class BuildVolume(SceneNode):
# Mark the node as outside build volume if the set extruder is disabled
extruder_position = node.callDecoration("getActiveExtruderPosition")
if extruder_position not in self._global_container_stack.extruders:
continue
if not self._global_container_stack.extruders[extruder_position].isEnabled:
node.setOutsideBuildArea(True)
continue