We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent f01c57a commit eed4ee6Copy full SHA for eed4ee6
src/gui/editorwidgets/qgsrelationreferencewidget.cpp
@@ -365,7 +365,11 @@ QVariant QgsRelationReferenceWidget::foreignKey()
365
}
366
else
367
{
368
- if ( !mFeature.isValid() )
+ if ( mReferencingFieldIdx < 0 || mReferencingFieldIdx >= mReferencingLayer->fields().count() )
369
+ {
370
+ return QVariant();
371
+ }
372
+ else if ( !mFeature.isValid() )
373
374
return QVariant( mReferencingLayer->fields().at( mReferencingFieldIdx ).type() );
375
0 commit comments