Skip to content

Commit

Permalink
fix(Snapping): avoid memory leaks of point locator
Browse files Browse the repository at this point in the history
  • Loading branch information
troopa81 committed Feb 12, 2025
1 parent 84d1ae6 commit 59045c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgssnappingutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 59045c6

Please sign in to comment.