Skip to content

Commit

Permalink
[Bugfix] Return false from QgsVectorLayer::setDataProvider if provide…
Browse files Browse the repository at this point in the history
…r is not valid
  • Loading branch information
manisandro committed Mar 19, 2019
1 parent 0996c93 commit 0360b45
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -1594,6 +1594,7 @@ bool QgsVectorLayer::setDataProvider( QString const &provider, const QgsDataProv
if ( !mValid )
{
QgsDebugMsgLevel( QStringLiteral( "Invalid provider plugin %1" ).arg( QString( mDataSource.toUtf8() ) ), 2 );
return false;
}

if ( mDataProvider->capabilities() & QgsVectorDataProvider::ReadLayerMetadata )
Expand Down

0 comments on commit 0360b45

Please sign in to comment.