Skip to content
Permalink
Browse files

Fix crash when changing point cloud to Attribute by Ramp renderer

Fixes #42486
  • Loading branch information
nyalldawson authored and nirvn committed Mar 26, 2021
1 parent a15d881 commit 924c70d0d1aa6d6673691a4087c091ea93be4102
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/pointcloud/qgspointcloudattributebyramprenderer.cpp
@@ -181,7 +181,7 @@ QList<QgsLayerTreeModelLegendNode *> QgsPointCloudAttributeByRampRenderer::creat
case QgsColorRampShader::Interpolated:
// for interpolated shaders we use a ramp legend node unless the settings flag
// to use the continuous legend is not set, in that case we fall through
if ( ! mColorRampShader.legendSettings() || mColorRampShader.legendSettings()->useContinuousLegend() )
if ( mColorRampShader.sourceColorRamp() && ( ! mColorRampShader.legendSettings() || mColorRampShader.legendSettings()->useContinuousLegend() ) )
{
res << new QgsColorRampLegendNode( nodeLayer, mColorRampShader.sourceColorRamp()->clone(),
mColorRampShader.legendSettings() ? *mColorRampShader.legendSettings() : QgsColorRampLegendNodeSettings(),

0 comments on commit 924c70d

Please sign in to comment.