diff --git a/gui/wxpython/vdigit/wxdisplay.py b/gui/wxpython/vdigit/wxdisplay.py index 434083b2184..d61158bd657 100644 --- a/gui/wxpython/vdigit/wxdisplay.py +++ b/gui/wxpython/vdigit/wxdisplay.py @@ -362,7 +362,14 @@ def _drawObject(self, robj): for i in range(robj.npoints): p = robj.point[i] points.append(wx.Point(p.x, p.y)) - + if len(points) <= 1: + self.log.write( + _( + "WARNING: Zero-length line or boundary drawing skipped. " + "Use v.clean to remove it." + ) + ) + return if robj.type == TYPE_AREA: pdc.DrawPolygon(points) else: