Skip to content
Permalink
Browse files
Fix crash in vector layer iteration on Qt6 builds
Decrementing an iterator which is already at the beginning results
in a crash
  • Loading branch information
nyalldawson authored and github-actions committed Jul 20, 2021
1 parent 1c3c5cd commit c615e04d0c032909feb374b70e25ad738cc43731
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/core/vector/qgsvectorlayerfeatureiterator.cpp
@@ -537,7 +537,8 @@ bool QgsVectorLayerFeatureIterator::isValid() const

bool QgsVectorLayerFeatureIterator::fetchNextAddedFeature( QgsFeature &f )
{
while ( mFetchAddedFeaturesIt-- != mSource->mAddedFeatures.constBegin() )
while ( mFetchAddedFeaturesIt != mSource->mAddedFeatures.constBegin() &&
mFetchAddedFeaturesIt-- != mSource->mAddedFeatures.constBegin() )
{
QgsFeatureId fid = mFetchAddedFeaturesIt->id();

0 comments on commit c615e04

Please sign in to comment.