Skip to content
Permalink
Browse files

Set data provider key for QgsPointCloudLayer, so that QgsPointCloudLa…

…yer::providerType()

returns the correct value

Fixes a crash on exit caused because the provider metadata for the layer
cannot be retrieved unless providerType is correct
  • Loading branch information
nyalldawson committed Oct 26, 2020
1 parent dda9eef commit aadca8c5d45f4ee115f9d7204d648397bed72ad3
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/core/pointcloud/qgspointcloudlayer.cpp
@@ -140,6 +140,7 @@ QString QgsPointCloudLayer::loadDefaultStyle( bool &resultFlag )
bool QgsPointCloudLayer::loadDataSource( const QString &providerLib, const QgsDataProvider::ProviderOptions &options, QgsDataProvider::ReadFlags flags )
{
QString dataSource = mDataSource;
mProviderKey = providerLib;

mDataProvider.reset( qobject_cast<QgsPointCloudDataProvider *>( QgsProviderRegistry::instance()->createProvider( providerLib, dataSource, options, flags ) ) );
if ( !mDataProvider )

0 comments on commit aadca8c

Please sign in to comment.
You can’t perform that action at this time.