From 63e586ab5ba0d628da01d838ec6d1846c49f4247 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 17 May 2017 13:44:21 +0200 Subject: [PATCH] Ensure the value of limit_to_extruder is an extruder before accessing it Contributes to CURA-3738 --- cura/Settings/GlobalStack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Settings/GlobalStack.py b/cura/Settings/GlobalStack.py index 33dc9ab2b5..4dba8278f3 100755 --- a/cura/Settings/GlobalStack.py +++ b/cura/Settings/GlobalStack.py @@ -81,7 +81,7 @@ class GlobalStack(CuraContainerStack): # Handle the "limit_to_extruder" property. limit_to_extruder = super().getProperty(key, "limit_to_extruder") - if limit_to_extruder is not None and limit_to_extruder != "-1": + if limit_to_extruder is not None and limit_to_extruder != "-1" and limit_to_extruder in self._extruders: if super().getProperty(key, "settable_per_extruder"): result = self._extruders[str(limit_to_extruder)].getProperty(key, property_name) if result is not None: