Don't render null items

This commit is contained in:
Garret Fick 2016-05-08 22:13:08 +08:00
parent af86c5c5a2
commit 7fda8eb9f5

View file

@ -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):