mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Check if scene has gcode_dict attribute before trying to get it
This commit is contained in:
parent
67aa21ba6c
commit
33da81d0d2
1 changed files with 5 additions and 1 deletions
|
@ -54,7 +54,11 @@ class PostProcessingPlugin(QObject, Extension):
|
||||||
## Execute all post-processing scripts on the gcode.
|
## Execute all post-processing scripts on the gcode.
|
||||||
def execute(self, output_device):
|
def execute(self, output_device):
|
||||||
scene = Application.getInstance().getController().getScene()
|
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:
|
if not gcode_dict:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue