Skip to content

Commit

Permalink
Fix invalid layer in value relation field
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasMizera committed Jul 19, 2024
1 parent f0b69c6 commit dd05acc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/featuresmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ int FeaturesModel::rowCount( const QModelIndex &parent ) const

QVariant FeaturesModel::featureTitle( const FeatureLayerPair &featurePair ) const
{
if ( !featurePair.layer() || !featurePair.layer()->isValid() )
{
CoreUtils::log( QStringLiteral( "Features Model" ), QStringLiteral( "Received invalid feature layer pair!" ) );
return tr( "Unknown title" );
}

QString title;

QgsExpressionContext context( QgsExpressionContextUtils::globalProjectLayerScopes( featurePair.layer() ) );
Expand Down

0 comments on commit dd05acc

Please sign in to comment.