diff options
author | Jaime van Kessel <nallath@gmail.com> | 2019-08-19 12:42:52 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2019-08-19 12:42:52 +0300 |
commit | 2417705dfd6f99ebcaa4d7516ebfc4367fd155cb (patch) | |
tree | f0994f9ac81cc3690dd240b1ee33f90597b08fea /plugins/XmlMaterialProfile | |
parent | dc26f98a3ade105d853e51b05f99eb043553e9b7 (diff) |
Prevent crashes when duplicating a material
CURA-6600
Diffstat (limited to 'plugins/XmlMaterialProfile')
-rw-r--r-- | plugins/XmlMaterialProfile/XmlMaterialProfile.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 2ab9e701eb..157d871d54 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -244,7 +244,10 @@ class XmlMaterialProfile(InstanceContainer): variant_name = container.getMetaDataEntry("variant_name") if variant_name: - variant_dict = {"variant_node": variant_manager.getVariantNode(definition_id, variant_name), + variant_node = variant_manager.getVariantNode(definition_id, variant_name) + if variant_node is None: + continue + variant_dict = {"variant_node":variant_node , "material_container": container} machine_variant_map[definition_id][variant_name] = variant_dict continue |