Skip to content

Commit 69eb659

Browse files
committed
Fix crash in relation reference widget
1 parent 85f29ed commit 69eb659

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gui/editorwidgets/qgsrelationreferencewidget.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ QVariant QgsRelationReferenceWidget::foreignKey()
353353
{
354354
if ( !mFeature.isValid() )
355355
{
356-
return QVariant( mReferencingLayer->fields().at( mFkeyFieldIdx ).type() );
356+
return QVariant( mReferencingLayer->fields().at( mReferencingLayer->fieldNameIndex( mRelation.fieldPairs().at( 0 ).first ) ).type() );
357357
}
358358
else
359359
{

0 commit comments

Comments
 (0)