Skip to content
Permalink
Browse files

vector layer ctor: avoid 'Data source is invalid' warning when invoke…

…d with defaults
  • Loading branch information
jef-n committed Mar 2, 2017
1 parent d315fdf commit 09e1c8c71a167527a25f4b6efa058f89dac3c89d
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/qgsvectorlayer.cpp
@@ -159,7 +159,7 @@ QgsVectorLayer::QgsVectorLayer( const QString& vectorLayerPath,
connect( mJoinBuffer, &QgsVectorLayerJoinBuffer::joinedFieldsChanged, this, &QgsVectorLayer::onJoinedFieldsChanged );

// if we're given a provider type, try to create and bind one to this layer
if ( ! mProviderKey.isEmpty() )
if ( !vectorLayerPath.isEmpty() && !mProviderKey.isEmpty() )
{
setDataSource( vectorLayerPath, baseName, providerKey, loadDefaultStyleFlag );
}

0 comments on commit 09e1c8c

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