Skip to content

Commit

Permalink
Don't use data provider before we check it's non-null
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdkon committed Jan 9, 2025
1 parent 5777b8e commit be704de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/pointcloud/qgspointcloudlayerrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@

QgsPointCloudLayerRenderer::QgsPointCloudLayerRenderer( QgsPointCloudLayer *layer, QgsRenderContext &context )
: QgsMapLayerRenderer( layer->id(), &context )
, mIndex( layer->dataProvider()->index() )
, mLayerName( layer->name() )
, mLayerAttributes( layer->attributes() )
, mSubIndexes( layer && layer->dataProvider() ? layer->dataProvider()->subIndexes() : QVector<QgsPointCloudSubIndex>() )
Expand All @@ -53,6 +52,8 @@ QgsPointCloudLayerRenderer::QgsPointCloudLayerRenderer( QgsPointCloudLayer *laye
if ( !layer->dataProvider() || !layer->renderer() )
return;

mIndex = layer->dataProvider()->index();

QElapsedTimer timer;
timer.start();

Expand Down

0 comments on commit be704de

Please sign in to comment.