Skip to content

Commit

Permalink
Fix cppcheck warning
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 15, 2022
1 parent 711a112 commit fb9b49c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/expression/qgsexpressionutils.cpp
Expand Up @@ -168,7 +168,7 @@ void QgsExpressionUtils::executeLambdaForMapLayer( const QVariant &value, const
return;
}

if ( context->layerStores().empty() )
if ( !context || context->layerStores().empty() )
{
// if no layer stores, then this is only for layers in project and therefore associated with the main thread
auto runFunction = [ value, context, expression, &function, &foundLayer ]
Expand Down

0 comments on commit fb9b49c

Please sign in to comment.