From 8d6136bcf3f7a282d03e83b887196e28644bf055 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 1 May 2019 13:14:40 +0200 Subject: [PATCH] Don't crash when materials are not registered It can't update the nodes structure with the links between materials then. Contributes to issue CURA-6444. --- cura/Machines/MaterialManager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cura/Machines/MaterialManager.py b/cura/Machines/MaterialManager.py index 634f1ba2bd..2163cde623 100644 --- a/cura/Machines/MaterialManager.py +++ b/cura/Machines/MaterialManager.py @@ -103,6 +103,8 @@ class MaterialManager(QObject): continue root_material_id = material_metadata.get("base_file", "") + if root_material_id not in material_metadatas: #Not a registered material profile. Don't store this in the look-up tables. + continue if root_material_id not in self._material_group_map: self._material_group_map[root_material_id] = MaterialGroup(root_material_id, MaterialNode(material_metadatas[root_material_id])) self._material_group_map[root_material_id].is_read_only = self._container_registry.isReadOnly(root_material_id)