Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't wrongly return the expression of another field
Fix #46231
  • Loading branch information
domi4484 authored and nyalldawson committed Nov 30, 2021
1 parent 914f737 commit 9485243
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/vector/qgsvectorlayer.cpp
Expand Up @@ -3896,6 +3896,9 @@ void QgsVectorLayer::removeExpressionField( int index )

QString QgsVectorLayer::expressionField( int index ) const
{
if ( mFields.fieldOrigin( index ) != QgsFields::OriginExpression )
return QString();

int oi = mFields.fieldOriginIndex( index );
if ( oi < 0 || oi >= mExpressionFieldBuffer->expressions().size() )
return QString();
Expand Down

0 comments on commit 9485243

Please sign in to comment.