diff --git a/src/core/pointcloud/qgspointcloudlayerexporter.cpp b/src/core/pointcloud/qgspointcloudlayerexporter.cpp index e5e4787792d6..c042aa5d1b11 100644 --- a/src/core/pointcloud/qgspointcloudlayerexporter.cpp +++ b/src/core/pointcloud/qgspointcloudlayerexporter.cpp @@ -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() ) ) { diff --git a/src/core/pointcloud/qgspointcloudlayerexporter.h b/src/core/pointcloud/qgspointcloudlayerexporter.h index 45ed03e42357..fbca3aa606c8 100644 --- a/src/core/pointcloud/qgspointcloudlayerexporter.h +++ b/src/core/pointcloud/qgspointcloudlayerexporter.h @@ -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;