From fc104867408dc335131de73e10fa60760036c416 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 30 Jun 2017 13:22:31 -0700 Subject: [PATCH] Ensure there are at least 3 points in the list for DrawSpline --- wx/lib/plot/polyobjects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wx/lib/plot/polyobjects.py b/wx/lib/plot/polyobjects.py index 97ad06c3..a6b9f63f 100644 --- a/wx/lib/plot/polyobjects.py +++ b/wx/lib/plot/polyobjects.py @@ -522,7 +522,7 @@ class PolySpline(PolyLine): pen.SetCap(wx.CAP_ROUND) dc.SetPen(pen) if coord is None: - if len(self.scaled): # bugfix for Mac OS X + if len(self.scaled) >= 3: dc.DrawSpline(self.scaled) else: dc.DrawLines(coord) # draw legend line