From dab0ebd2084649c2b4348caed7c70b6a7013848e Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 10 Jan 2018 14:25:09 +0100 Subject: CURA-4525 fix saving empty gcode giving error --- plugins/GCodeWriter/GCodeWriter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/GCodeWriter') diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py index f0e5c88f37..95c48c4d9e 100644 --- a/plugins/GCodeWriter/GCodeWriter.py +++ b/plugins/GCodeWriter/GCodeWriter.py @@ -64,8 +64,8 @@ class GCodeWriter(MeshWriter): gcode_dict = getattr(scene, "gcode_dict") if not gcode_dict: return False - gcode_list = gcode_dict.get(active_build_plate) - if gcode_list: + gcode_list = gcode_dict.get(active_build_plate, None) + if gcode_list is not None: for gcode in gcode_list: stream.write(gcode) # Serialise the current container stack and put it at the end of the file. -- cgit v1.2.3