Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 18, 2020
1 parent 8eb9448 commit c8b71ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/raster/qgssinglebandpseudocolorrenderer.cpp
Expand Up @@ -426,6 +426,9 @@ bool QgsSingleBandPseudoColorRenderer::accept( QgsStyleEntityVisitorInterface *v

QList<QgsLayerTreeModelLegendNode *> QgsSingleBandPseudoColorRenderer::createLegendNodes( QgsLayerTreeLayer *nodeLayer )
{
if ( !mShader )
return QList<QgsLayerTreeModelLegendNode *>();

const QgsColorRampShader *rampShader = dynamic_cast<const QgsColorRampShader *>( mShader->rasterShaderFunction() );
if ( !rampShader )
return QList<QgsLayerTreeModelLegendNode *>();
Expand Down

0 comments on commit c8b71ef

Please sign in to comment.