From b7b476b36c657a8033eb321daba8fb63cdbc8cdf Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Wed, 3 Dec 2014 16:30:35 -0800 Subject: [PATCH] Don't introduce bogus geometries in clipped-away features. --- geometry.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/geometry.cc b/geometry.cc index c7efc32..54fbf7c 100644 --- a/geometry.cc +++ b/geometry.cc @@ -569,6 +569,10 @@ drawvec simplify_lines(drawvec &geom, int z, int detail) { drawvec reorder_lines(drawvec &geom) { // Only reorder simple linestrings with a single moveto + if (geom.size() == 0) { + return geom; + } + unsigned i; for (i = 0; i < geom.size(); i++) { if (geom[i].op == VT_MOVETO) {