Skip to content

Commit

Permalink
No need to crash when there are no errors
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso authored and nyalldawson committed Oct 9, 2020
1 parent ffc71b5 commit 9fcdbb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsvectordataprovider.cpp
Expand Up @@ -92,7 +92,7 @@ bool QgsVectorDataProvider::addFeatures( QgsFeatureList &flist, Flags flags )

QString QgsVectorDataProvider::lastError() const
{
return mErrors.last();
return mErrors.isEmpty() ? QString() : mErrors.last();
}

bool QgsVectorDataProvider::deleteFeatures( const QgsFeatureIds &ids )
Expand Down

0 comments on commit 9fcdbb1

Please sign in to comment.