Skip to content

Commit

Permalink
Fix leak in point cloud exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 17, 2024
1 parent 527d511 commit 73c740c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/pointcloud/qgspointcloudlayerexporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ QString QgsPointCloudLayerExporter::getOgrDriverName( ExportFormat format )

QgsPointCloudLayerExporter::QgsPointCloudLayerExporter( QgsPointCloudLayer *layer )
: mLayerAttributeCollection( layer->attributes() )
, mIndex( layer->dataProvider()->index()->clone().release() )
, mIndex( layer->dataProvider()->index()->clone() )
, mSourceCrs( QgsCoordinateReferenceSystem( layer->crs() ) )
, mTargetCrs( QgsCoordinateReferenceSystem( layer->crs() ) )
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/pointcloud/qgspointcloudlayerexporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class CORE_EXPORT QgsPointCloudLayerExporter SIP_NODEFAULTCTORS

const QgsPointCloudAttributeCollection mLayerAttributeCollection;

QgsPointCloudIndex *mIndex = nullptr;
std::unique_ptr< QgsPointCloudIndex > mIndex;
QString mName = QObject::tr( "Exported" );
ExportFormat mFormat = ExportFormat::Memory;
QString mFilename;
Expand Down

0 comments on commit 73c740c

Please sign in to comment.