From 1af56871e2232ca4eb0d409c47ba73fdf658915e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 25 Apr 2018 09:58:10 +0200 Subject: [PATCH] Don't crash if the number of extruders in setting doesn't match ...with the actual number of extruders. These could misalign with Custom FDM Printer or when any of the extruders was deleted because of a configuration format error. Contributes to issue #3570. --- cura/Machines/QualityManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Machines/QualityManager.py b/cura/Machines/QualityManager.py index 9f343c8cf3..cb0a2f5922 100644 --- a/cura/Machines/QualityManager.py +++ b/cura/Machines/QualityManager.py @@ -163,7 +163,7 @@ class QualityManager(QObject): def _updateQualityGroupsAvailability(self, machine: "GlobalStack", quality_group_list): used_extruders = set() for i in range(machine.getProperty("machine_extruder_count", "value")): - if machine.extruders[str(i)].isEnabled: + if str(i) in machine.extruders and machine.extruders[str(i)].isEnabled: used_extruders.add(str(i)) # Update the "is_available" flag for each quality group.