Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2019-08-19 12:42:52 +0300
committerJaime van Kessel <nallath@gmail.com>2019-08-19 12:42:52 +0300
commit2417705dfd6f99ebcaa4d7516ebfc4367fd155cb (patch)
treef0994f9ac81cc3690dd240b1ee33f90597b08fea /plugins/XmlMaterialProfile
parentdc26f98a3ade105d853e51b05f99eb043553e9b7 (diff)
Prevent crashes when duplicating a material
CURA-6600
Diffstat (limited to 'plugins/XmlMaterialProfile')
-rw-r--r--plugins/XmlMaterialProfile/XmlMaterialProfile.py5
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