Ensure there are at least 3 points in the list for DrawSpline

This commit is contained in:
Robin Dunn
2017-06-30 13:22:31 -07:00
parent a7b9b026d6
commit fc10486740

View File

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