mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 05:23:58 -06:00
CURA-4606 CURA-5002 fix crash with machine with variants, but no variants defined
This commit is contained in:
parent
f946f62db1
commit
3591e01b25
2 changed files with 4 additions and 3 deletions
|
@ -256,8 +256,9 @@ class MaterialManager(QObject):
|
|||
material_id_metadata_dict = dict()
|
||||
for node in nodes_to_check:
|
||||
if node is not None:
|
||||
material_id_metadata_dict = {mid: node for mid, node in node.material_map.items()}
|
||||
break
|
||||
for material_id, node in node.material_map.items():
|
||||
if material_id not in material_id_metadata_dict:
|
||||
material_id_metadata_dict[material_id] = node
|
||||
|
||||
return material_id_metadata_dict
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue