diff --git a/include/mapnik/svg/svg_converter.hpp b/include/mapnik/svg/svg_converter.hpp index 103a14d6c..0bb09b6bc 100644 --- a/include/mapnik/svg/svg_converter.hpp +++ b/include/mapnik/svg/svg_converter.hpp @@ -73,7 +73,11 @@ class svg_converter : util::noncopyable current_group_ = ¤t_group_->elements.back().get(); } - void end_group() { current_group_ = current_group_->parent; } + void end_group() + { + if (current_group_->parent != nullptr) + current_group_ = current_group_->parent; + } void begin_path() {