From 54d07ae29bc63a731d1a13d0eb6eb210d3841d82 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 28 Sep 2016 14:20:58 +0200 Subject: [PATCH] Fix error when no machine is active --- cura/PrintInformation.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index e992b14e06..b65101ecc7 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -130,7 +130,12 @@ class PrintInformation(QObject): ## Created an acronymn-like abbreviated machine name from the currently active machine name # Called each time the global stack is switched def _setAbbreviatedMachineName(self): - global_stack_name = Application.getInstance().getGlobalContainerStack().getName() + global_container_stack = Application.getInstance().getGlobalContainerStack() + if not global_container_stack: + self._abbr_machine = "" + return + + global_stack_name = global_container_stack.getName() split_name = global_stack_name.split(" ") abbr_machine = "" for word in split_name: