Skip to content
Permalink
Browse files
Fixes crash in QgsRelationReferenceWidget
  • Loading branch information
pblottiere committed Dec 5, 2017
1 parent 1cd8b94 commit 7c2732d
Showing 1 changed file with 2 additions and 1 deletion.
@@ -267,7 +267,8 @@ void QgsRelationReferenceWidget::setForeignKey( const QVariant &value )

mReferencedLayer->getFeatures( request ).nextFeature( mFeature );

for ( int i = 0; i < mFilterFields.size(); i++ )
const int count = std::min( mFilterComboBoxes.size(), mFilterFields.size() );
for ( int i = 0; i < count; i++ )
{
QVariant v = mFeature.attribute( mFilterFields[i] );
QString f = v.isNull() ? nullValue.toString() : v.toString();

0 comments on commit 7c2732d

Please sign in to comment.