Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[backport] Checks for nullptr node from RULE
fixes #38766

Backported from master #38775
  • Loading branch information
elpaso authored and nyalldawson committed Sep 16, 2020
1 parent 8b051b9 commit a5a5c4d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server/services/wms/qgswmsgetlegendgraphics.cpp
Expand Up @@ -101,6 +101,10 @@ namespace QgsWms
if ( !parameters.rule().isEmpty() )
{
QgsLayerTreeModelLegendNode *node = legendNode( parameters.rule(), *model.get() );
if ( ! node )
{
throw QgsException( QStringLiteral( "Could not get a legend node for the requested RULE" ) );
}
result.reset( renderer.getLegendGraphics( *node ) );
}
else
Expand Down

0 comments on commit a5a5c4d

Please sign in to comment.