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 github-actions committed Mar 26, 2021
1 parent 82af02c commit ebe9ce48f8b7166e8e75351ab655e0eec01dd201
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 ebe9ce4

Please sign in to comment.