Browse Source

Fix crashing if the quality_type_to_apply is None

Fixes sentry issue CURA-24D
Kostas Karmas 3 years ago
parent
commit
00ade8be3a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins/3MFReader/ThreeMFWorkspaceReader.py

+ 1 - 1
plugins/3MFReader/ThreeMFWorkspaceReader.py

@@ -1157,7 +1157,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
                 return
             machine_manager.setQualityChangesGroup(quality_changes_group, no_dialog = True)
         else:
-            self._quality_type_to_apply = self._quality_type_to_apply.lower()
+            self._quality_type_to_apply = self._quality_type_to_apply.lower() if self._quality_type_to_apply else None
             quality_group_dict = container_tree.getCurrentQualityGroups()
             if self._quality_type_to_apply in quality_group_dict:
                 quality_group = quality_group_dict[self._quality_type_to_apply]