Skip to content
Permalink
Browse files

do not crash when no edit buffer

  • Loading branch information
3nids authored and m-kuhn committed Oct 1, 2018
1 parent 62b9f60 commit 7f70c21a131acb8cbe928756b1aaac14c030a2e9
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/app/qgsgeometryvalidationservice.cpp
@@ -256,8 +256,12 @@ void QgsGeometryValidationService::triggerTopologyChecks( QgsVectorLayer *layer
emit topologyChecksCleared( layer );
cancelTopologyCheck( layer );

QgsFeatureIds affectedFeatureIds = layer->editBuffer()->changedGeometries().keys().toSet();
affectedFeatureIds.unite( layer->editBuffer()->addedFeatures().keys().toSet() );
QgsFeatureIds affectedFeatureIds;
if ( layer->editBuffer() )
{
affectedFeatureIds = layer->editBuffer()->changedGeometries().keys().toSet();
affectedFeatureIds.unite( layer->editBuffer()->addedFeatures().keys().toSet() );
}

QgsFeaturePool *featurePool = mFeaturePools.value( layer->id() );
if ( !featurePool )

0 comments on commit 7f70c21

Please sign in to comment.
You can’t perform that action at this time.