Commit 0e4df76f authored by Guillaume Seguin's avatar Guillaume Seguin

Fix potential race by checking for Noneness explicitely

Just checking boolean value would lead to a len() call, which might fail
as line_idxs might not have been set yet
parent b4793bd7
......@@ -265,7 +265,7 @@ class GcodeViewLoader(object):
if self.root else False)
if self.root:
set_model_colors(self.model, self.root)
if gcode:
if gcode is not None:
generator = self.model.load_data(gcode)
generator_output = generator.next()
while generator_output is not None:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment