From e901058eba637da27be54dc5f5601441b8686103 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 19 May 2011 21:24:08 +0000 Subject: [PATCH] skip null geometries for indexed shapefiles (already skip for non-indexed) to avoid invalid reads - TODO - consider not adding to index to avoid need to skip --- plugins/input/shape/shape_index_featureset.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/input/shape/shape_index_featureset.cpp b/plugins/input/shape/shape_index_featureset.cpp index 1a1843d53..3b8998213 100644 --- a/plugins/input/shape/shape_index_featureset.cpp +++ b/plugins/input/shape/shape_index_featureset.cpp @@ -150,8 +150,14 @@ feature_ptr shape_index_featureset::next() while(!filter_.pass(shape_.current_extent()) && itr_!=ids_.end()) { - pos=*itr_++; - shape_.move_to(pos); + if (shape_.type() != shape_io::shape_null) { + pos=*itr_++; + shape_.move_to(pos); + } + else + { + return feature_ptr(); + } } switch (type)