mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -04:00
Fix crash executeGeomOverlay called without context
Fix unreported crash.
This commit is contained in:
parent
04446f9d56
commit
552b63a7e8
@ -7746,6 +7746,12 @@ typedef bool ( QgsGeometry::*RelationFunction )( const QgsGeometry &geometry ) c
|
||||
static QVariant executeGeomOverlay( const QVariantList &values, const QgsExpressionContext *context, QgsExpression *parent, const RelationFunction &relationFunction, bool invert = false, double bboxGrow = 0, bool isNearestFunc = false, bool isIntersectsFunc = false )
|
||||
{
|
||||
|
||||
if ( ! context )
|
||||
{
|
||||
parent->setEvalErrorString( QObject::tr( "This function was called without an expression context." ) );
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
const QVariant sourceLayerRef = context->variable( QStringLiteral( "layer" ) ); //used to detect if sourceLayer and targetLayer are the same
|
||||
// TODO this function is NOT thread safe
|
||||
Q_NOWARN_DEPRECATED_PUSH
|
||||
|
Loading…
x
Reference in New Issue
Block a user