Skip to content
Permalink
Browse files

Fixes crash in QgsRelationReferenceWidget

  • Loading branch information
pblottiere committed Nov 30, 2017
1 parent 1cd8b94 commit 7c2732d1ad7161736ea7cc9e37b29d2a1f55e0aa
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/gui/editorwidgets/qgsrelationreferencewidget.cpp
@@ -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.
You can’t perform that action at this time.