diff --git a/src/analysis/vector/geometry_checker/qgsfeaturepool.cpp b/src/analysis/vector/geometry_checker/qgsfeaturepool.cpp index 5a53b3a6e5f6a..5090b10864085 100644 --- a/src/analysis/vector/geometry_checker/qgsfeaturepool.cpp +++ b/src/analysis/vector/geometry_checker/qgsfeaturepool.cpp @@ -66,6 +66,9 @@ bool QgsFeaturePool::getFeature( QgsFeatureId id, QgsFeature &feature ) } locker.changeMode( QgsReadWriteLocker::Write ); mFeatureCache.insert( id, new QgsFeature( feature ) ); + + //cleanup the index, in case the feature was evicted from the cache but is still in the index + mIndex.deleteFeature( id ); mIndex.addFeature( feature ); } return true;