diff --git a/src/Mod/Draft/draftfunctions/svg.py b/src/Mod/Draft/draftfunctions/svg.py index 2b30ccb55b..c2137cf1a3 100644 --- a/src/Mod/Draft/draftfunctions/svg.py +++ b/src/Mod/Draft/draftfunctions/svg.py @@ -103,8 +103,9 @@ def get_arrow(obj, arrowtype, point, arrowsize, color, linewidth, angle=0): """Get the SVG representation from an arrow.""" svg = "" + vobj = _get_view_object(obj) - if not App.GuiUp or not obj.ViewObject: + if not App.GuiUp or vobj is None: return svg _cx_cy_r = 'cx="{}" cy="{}" r="{}"'.format(point.x, point.y, arrowsize) @@ -114,7 +115,7 @@ def get_arrow(obj, _scale = 'scale({size},{size})'.format(size=arrowsize) _style = 'style="stroke-miterlimit:4;stroke-dasharray:none;stroke-linecap:square"' - if obj.ViewObject.ArrowType == "Circle": + if vobj.ArrowType == "Circle": svg += '