From 7fda8eb9f52b7be9cdf95807c036e3e1cfce3e7c Mon Sep 17 00:00:00 2001 From: Garret Fick Date: Sun, 8 May 2016 22:13:08 +0800 Subject: Don't render null items --- gerber/render/render.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gerber/render/render.py b/gerber/render/render.py index a5ae38e..41b632c 100644 --- a/gerber/render/render.py +++ b/gerber/render/render.py @@ -132,6 +132,8 @@ class GerberContext(object): self._invert = invert def render(self, primitive): + if not primitive: + return color = (self.color if primitive.level_polarity == 'dark' else self.background_color) if isinstance(primitive, Line): -- cgit