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