Skip to content

Commit

Permalink
[fix] When switching diagram type from none to any other one, check n…
Browse files Browse the repository at this point in the history
…ullptr renderer when syncing to layer
  • Loading branch information
gacarrillor authored and nyalldawson committed Nov 6, 2024
1 parent 15351d7 commit a11f8aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/vector/qgsdiagramproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ void QgsDiagramProperties::insertDefaults()
void QgsDiagramProperties::syncToLayer()
{
const QgsDiagramRenderer *renderer = mLayer->diagramRenderer();
if ( renderer->rendererName() == QgsStackedDiagramRenderer::DIAGRAM_RENDERER_NAME_STACKED )
if ( renderer && renderer->rendererName() == QgsStackedDiagramRenderer::DIAGRAM_RENDERER_NAME_STACKED )
{
const QgsStackedDiagramRenderer *stackedRenderer = static_cast< const QgsStackedDiagramRenderer *>( renderer );
if ( stackedRenderer->rendererCount() > 0 )
Expand Down

0 comments on commit a11f8aa

Please sign in to comment.