Browse Source

Check if dict has key before accessing in BuildVolume

Lipu Fei 6 years ago
parent
commit
1468ac1d59
1 changed files with 2 additions and 0 deletions
  1. 2 0
      cura/BuildVolume.py

+ 2 - 0
cura/BuildVolume.py

@@ -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