Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-3_40] Misc coverity fixes #59930

Merged
merged 11 commits into from
Dec 17, 2024
Prev Previous commit
Next Next commit
Fix leak
  • Loading branch information
nyalldawson authored and github-actions[bot] committed Dec 17, 2024
commit a27931e1968d47080b9a46daac3e664efd80d25e
8 changes: 4 additions & 4 deletions src/app/mesh/qgsmaptooleditmeshframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2754,12 +2754,12 @@ void QgsMapToolEditMeshFrame::selectByExpression( const QString &textExpression,
return;
QgsExpression expression( textExpression );

std::unique_ptr<QgsDistanceArea> distArea = std::make_unique<QgsDistanceArea>();
distArea->setSourceCrs( mCurrentLayer->crs(), QgsProject::instance()->transformContext() );
distArea->setEllipsoid( QgsProject::instance()->ellipsoid() );
QgsDistanceArea distArea;
distArea.setSourceCrs( mCurrentLayer->crs(), QgsProject::instance()->transformContext() );
distArea.setEllipsoid( QgsProject::instance()->ellipsoid() );
expression.setAreaUnits( QgsProject::instance()->areaUnits() );
expression.setDistanceUnits( QgsProject::instance()->distanceUnits() );
expression.setGeomCalculator( distArea.release() );
expression.setGeomCalculator( &distArea );

switch ( elementType )
{
Expand Down