diff options
author | Ghostkeeper <rubend@tutanota.com> | 2016-10-25 14:20:02 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2016-10-25 17:36:17 +0300 |
commit | 623f9cb4fc9496e14f5def61f60a3a3a6cfb1d19 (patch) | |
tree | 8d6fb8477e3a7389ff0b76d12a03f49bc8927836 /plugins | |
parent | 7e5ffe79b6adae6a7f786a54ac7e07ca611b70d8 (diff) |
Abort importing profile if we have no global container stack
You shouldn't be able to trigger it anyway, but if you do, it'll give a proper error that the import failed.
Contributes to issue CURA-2785.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/LegacyProfileReader/LegacyProfileReader.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/LegacyProfileReader/LegacyProfileReader.py b/plugins/LegacyProfileReader/LegacyProfileReader.py index 96a9d96902..8d4afdae7a 100644 --- a/plugins/LegacyProfileReader/LegacyProfileReader.py +++ b/plugins/LegacyProfileReader/LegacyProfileReader.py @@ -67,6 +67,8 @@ class LegacyProfileReader(ProfileReader): if file_name.split(".")[-1] != "ini": return None global_container_stack = Application.getInstance().getGlobalContainerStack() + if not global_container_stack: + return None multi_extrusion = global_container_stack.getProperty("machine_extruder_count", "value") > 1 if multi_extrusion: |