From 77cd73325803155971f42a1301276cea43816b3b Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Tue, 30 Apr 2024 09:59:35 +0100 Subject: [PATCH] svg_group - check parent is not nullptr --- include/mapnik/svg/svg_converter.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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() {