From d72b250a64c45ab922d7a022c76dcc46dc51170c Mon Sep 17 00:00:00 2001 From: EvilSpirit Date: Tue, 29 Mar 2016 15:54:55 +0600 Subject: [PATCH] Don't draw zero-length lines. Causes "Vector::WithMagnitude(...) of zero vector!" --- src/glhelper.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glhelper.cpp b/src/glhelper.cpp index 8e68772..d3406e1 100644 --- a/src/glhelper.cpp +++ b/src/glhelper.cpp @@ -324,6 +324,7 @@ void ssglStippledLine(Vector a, Vector b, double width, void ssglFatLine(Vector a, Vector b, double width) { + if(a.EqualsExactly(b)) return; // The half-width of the line we're drawing. double hw = width / 2; Vector ab = b.Minus(a);