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 e6b3cb1 commit a767f1c
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 @@ -54,7 +54,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 a767f1c

Please sign in to comment.