From cab6d239f2dedfbc509c6dcf0fa93018dd272f50 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 21 Nov 2013 13:09:18 -0800 Subject: [PATCH] apply 5eb406c7df to non PHOENIX_V3 code --- include/mapnik/json/geometry_grammar.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/mapnik/json/geometry_grammar.hpp b/include/mapnik/json/geometry_grammar.hpp index 416442161..157d0e6b1 100644 --- a/include/mapnik/json/geometry_grammar.hpp +++ b/include/mapnik/json/geometry_grammar.hpp @@ -117,8 +117,11 @@ struct close_path void operator() (T path) const { BOOST_ASSERT( path!=0 ); - path->close_path(); - } + if (path->size() > 2u) // to form a polygon ring we need at least 3 vertices + { + path->close_path(); + } + } }; struct cleanup