From cad0261e557632464452bf667fa8ea3a8002fd1f Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Tue, 31 Jan 2012 09:45:06 +0000 Subject: [PATCH] check if index is valid before pushing back value. --- include/mapnik/feature.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/mapnik/feature.hpp b/include/mapnik/feature.hpp index 3f788e27a..082bb43b3 100644 --- a/include/mapnik/feature.hpp +++ b/include/mapnik/feature.hpp @@ -143,7 +143,8 @@ public: else { cont_type::size_type index = ctx_->push(key); - data_.push_back(val); + if (index == data_.size()) + data_.push_back(val); } }