From b9f70c608ace2b2a0264ed04d08e8d3c7afe7fb0 Mon Sep 17 00:00:00 2001 From: JazzyNico Date: Thu, 23 Dec 2010 21:42:24 +0100 Subject: [PATCH] Extensions. Fix Color Markers extension (crashed when a fill or stroke attribute was not set.) --- share/extensions/markers_strokepaint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/extensions/markers_strokepaint.py b/share/extensions/markers_strokepaint.py index e37c81656..d357d1988 100644 --- a/share/extensions/markers_strokepaint.py +++ b/share/extensions/markers_strokepaint.py @@ -142,11 +142,11 @@ class MyEffect(inkex.Effect): children = mnode.xpath('.//*[@style]', namespaces=inkex.NSS) for child in children: cstyle = simplestyle.parseStyle(child.get('style')) - if (not(self.options.tab == '"object"' and cstyle['stroke'] == 'none' and self.options.fill_type == "filled")): + if (not('stroke' in cstyle and self.options.tab == '"object"' and cstyle['stroke'] == 'none' and self.options.fill_type == "filled")): cstyle['stroke'] = stroke if 'stroke_opacity' in locals(): cstyle['stroke-opacity'] = stroke_opacity - if (not(self.options.tab == '"object"' and cstyle['fill'] == 'none' and self.options.fill_type == "solid")): + if (not('fill' in cstyle and self.options.tab == '"object"' and cstyle['fill'] == 'none' and self.options.fill_type == "solid")): cstyle['fill'] = fill if 'fill_opacity' in locals(): cstyle['fill-opacity'] = fill_opacity -- 2.30.2