Navigation Menu

Skip to content

Commit

Permalink
do not crash when no edit buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored and m-kuhn committed Oct 15, 2018
1 parent 62b9f60 commit 7f70c21
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/qgsgeometryvalidationservice.cpp
Expand Up @@ -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 )
Expand Down

0 comments on commit 7f70c21

Please sign in to comment.