summaryrefslogtreecommitdiff
path: root/gerber/render/render.py
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2016-05-08 22:13:08 +0800
committerGarret Fick <garret@ficksworkshop.com>2016-05-08 22:13:08 +0800
commit7fda8eb9f52b7be9cdf95807c036e3e1cfce3e7c (patch)
tree41777682a0f3eb554fb7f72a8962b18a559f5b69 /gerber/render/render.py
parentaf86c5c5a228855f40ecbf02074bbec65fd9b6d1 (diff)
downloadgerbonara-7fda8eb9f52b7be9cdf95807c036e3e1cfce3e7c.tar.gz
gerbonara-7fda8eb9f52b7be9cdf95807c036e3e1cfce3e7c.tar.bz2
gerbonara-7fda8eb9f52b7be9cdf95807c036e3e1cfce3e7c.zip
Don't render null items
Diffstat (limited to 'gerber/render/render.py')
-rw-r--r--gerber/render/render.py2
1 files changed, 2 insertions, 0 deletions
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):