Skip to content
Permalink
Browse files
Fix memory leak in filter multipoint
  • Loading branch information
nyalldawson committed Aug 12, 2018
1 parent f7204fa commit 73f3164fe4d3f08b4393251142e27de7af8a7205
Showing 1 changed file with 12 additions and 1 deletion.
@@ -189,10 +189,21 @@ void QgsMultiPoint::filterVertices( const std::function<bool ( const QgsPoint &
{
if ( const QgsPoint *point = qgsgeometry_cast< const QgsPoint * >( part ) )
{
return !filter( *point );
if ( !filter( *point ) )
{
delete point;
return true;
}
else
{
return false;
}
}
else
{
delete part;
return true;
}
} ), mGeometries.end() ); // clazy:exclude=detaching-member
}

0 comments on commit 73f3164

Please sign in to comment.