Skip to content
Permalink
Browse files

Fix QgsVectorLayer::hasFeatures() crash when editable

  • Loading branch information
m-kuhn committed Jun 4, 2018
1 parent eff4bf9 commit 48a796dc9c7a03a19c6e056d581adadd6bb247bb
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/qgsvectorlayer.cpp
@@ -2767,8 +2767,8 @@ long QgsVectorLayer::featureCount() const

QgsFeatureSource::FeatureAvailability QgsVectorLayer::hasFeatures() const
{
const QgsFeatureIds deletedFeatures = mEditBuffer->deletedFeatureIds();
const QgsFeatureMap addedFeatures = mEditBuffer->addedFeatures();
const QgsFeatureIds deletedFeatures( mEditBuffer ? mEditBuffer->deletedFeatureIds() : QgsFeatureIds() );
const QgsFeatureMap addedFeatures( mEditBuffer ? mEditBuffer->addedFeatures() : QgsFeatureMap() );

if ( mEditBuffer && !deletedFeatures.empty() )
{

0 comments on commit 48a796d

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