Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix Coverity unchecked return value warning
  • Loading branch information
nyalldawson committed Apr 3, 2018
1 parent a3605b5 commit 0099b6e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/providers/arcgisrest/qgsafsshareddata.cpp
Expand Up @@ -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" ) )
{
Expand Down

0 comments on commit 0099b6e

Please sign in to comment.