Skip to content

Commit

Permalink
Fix: Check for existence of data provider to prevent segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored and jef-n committed Mar 27, 2013
1 parent 9154ed1 commit c6bd8a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayercache.cpp
Expand Up @@ -256,7 +256,7 @@ QgsFeatureIterator QgsVectorLayerCache::getFeatures( const QgsFeatureRequest &fe
it = mLayer->getFeatures( featureRequest );
}

if ( requiresWriterIt )
if ( requiresWriterIt && mLayer->dataProvider() )
{
// No index was able to satisfy the request
it = QgsFeatureIterator( new QgsCachedFeatureWriterIterator( this, featureRequest ) );
Expand Down

0 comments on commit c6bd8a1

Please sign in to comment.