Skip to content
Permalink
Browse files

Fix Coverity unchecked return value warning

  • Loading branch information
nyalldawson committed Apr 3, 2018
1 parent a3605b5 commit 0099b6ec5f3926069c6fc5631b5a04697f157340
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/providers/arcgisrest/qgsafsshareddata.cpp
@@ -107,7 +107,10 @@ bool QgsAfsSharedData::getFeature( QgsFeatureId id, QgsFeature &f, const QgsRect
// ensure that null values are mapped correctly for PyQGIS
attribute = QVariant( QVariant::Int );
}
mFields.at( idx ).convertCompatible( attribute );
if ( !mFields.at( idx ).convertCompatible( attribute ) )
{
QgsDebugMsg( QStringLiteral( "Invalid value %1 for field %2 of type %3" ).arg( attributesData[mFields.at( idx ).name()].toString(), mFields.at( idx ).name(), mFields.at( idx ).typeName() ) );
}
attributes[idx] = attribute;
if ( mFields.at( idx ).name() == QStringLiteral( "OBJECTID" ) )
{

0 comments on commit 0099b6e

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