diff --git a/src/marker_cache.cpp b/src/marker_cache.cpp index 6dbd6f5cb..7b15e087a 100644 --- a/src/marker_cache.cpp +++ b/src/marker_cache.cpp @@ -215,7 +215,16 @@ std::shared_ptr marker_cache::find(std::string const& uri, svg_path_adapter svg_path(stl_storage); svg_converter_type svg(svg_path, marker_path->attributes()); svg_parser p(svg); - p.parse(uri); + + + if (!p.parse(uri)) + { + for (auto const& msg : p.error_messages()) + { + std::cerr << "SVG PARSING ERROR:\"" << msg << "\"" << std::endl; + } + return std::make_shared(mapnik::marker_null()); + } //svg.arrange_orientations(); double lox,loy,hix,hiy; svg.bounding_rect(&lox, &loy, &hix, &hiy);