Skip to content

Commit 0360b45

Browse files
committedMar 19, 2019
[Bugfix] Return false from QgsVectorLayer::setDataProvider if provider is not valid
1 parent 0996c93 commit 0360b45

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎src/core/qgsvectorlayer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,6 +1594,7 @@ bool QgsVectorLayer::setDataProvider( QString const &provider, const QgsDataProv
15941594
if ( !mValid )
15951595
{
15961596
QgsDebugMsgLevel( QStringLiteral( "Invalid provider plugin %1" ).arg( QString( mDataSource.toUtf8() ) ), 2 );
1597+
return false;
15971598
}
15981599

15991600
if ( mDataProvider->capabilities() & QgsVectorDataProvider::ReadLayerMetadata )

0 commit comments

Comments
 (0)
Please sign in to comment.