From 33da81d0d285d08c422913de94fff9050c722e87 Mon Sep 17 00:00:00 2001 From: ChrisTerBeke Date: Mon, 15 Jan 2018 09:18:57 +0100 Subject: [PATCH] Check if scene has gcode_dict attribute before trying to get it --- plugins/PostProcessingPlugin/PostProcessingPlugin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.py b/plugins/PostProcessingPlugin/PostProcessingPlugin.py index 657e5c5387..fa519f48be 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.py +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.py @@ -54,7 +54,11 @@ class PostProcessingPlugin(QObject, Extension): ## Execute all post-processing scripts on the gcode. def execute(self, output_device): scene = Application.getInstance().getController().getScene() - gcode_dict = getattr(scene, "gcode_dict") + gcode_dict = None + + if hasattr(scene, "gcode_dict"): + gcode_dict = getattr(scene, "gcode_dict") + if not gcode_dict: return