Skip to content

Commit

Permalink
Fix crash in relation reference widget
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Nov 19, 2015
1 parent 85f29ed commit 69eb659
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgsrelationreferencewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ QVariant QgsRelationReferenceWidget::foreignKey()
{
if ( !mFeature.isValid() )
{
return QVariant( mReferencingLayer->fields().at( mFkeyFieldIdx ).type() );
return QVariant( mReferencingLayer->fields().at( mReferencingLayer->fieldNameIndex( mRelation.fieldPairs().at( 0 ).first ) ).type() );
}
else
{
Expand Down

0 comments on commit 69eb659

Please sign in to comment.