From 2b7eca29af8a78fba91cf68c461fe2d946318868 Mon Sep 17 00:00:00 2001 From: Joey de l'Arago Date: Wed, 22 Feb 2023 13:43:06 +0100 Subject: [PATCH] Continue if a printer has no active materials. This was causing a crash when loading the material combinations for a printer with two empty material slots. CURA-10110 --- cura/Machines/Models/CompatibleMachineModel.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cura/Machines/Models/CompatibleMachineModel.py b/cura/Machines/Models/CompatibleMachineModel.py index cf77a15085..40a3618b31 100644 --- a/cura/Machines/Models/CompatibleMachineModel.py +++ b/cura/Machines/Models/CompatibleMachineModel.py @@ -54,6 +54,8 @@ class CompatibleMachineModel(ListModel): # initialize & add current active material: for extruder in printer.extruders: + if not extruder.activeMaterial: + continue materials = [_makeMaterial( extruder.activeMaterial.brand, extruder.activeMaterial.name, extruder.activeMaterial.color)] extruder_configs[extruder.getPosition()] = {