fix(Snapping): avoid memory leaks of point locator

This commit is contained in:
Julien Cabieces 2025-02-12 15:30:56 +01:00 committed by Loïc Bartoletti
parent 7fd1c662eb
commit 15dca8dd7f

View File

@ -45,7 +45,7 @@ QgsPointLocator *QgsSnappingUtils::locatorForLayer( QgsVectorLayer *vl )
connect( vlpl, &QgsPointLocator::initFinished, this, &QgsSnappingUtils::onInitFinished );
connect( vl, &QObject::destroyed, this, [this, vl]()
{
mLocators.remove( vl );
delete mLocators.take( vl );
} );
mLocators.insert( vl, vlpl );