Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[diagrams] When an unknown diagram type is encountered, don't crash, …
…but instead fallback to known type

Avoids projects from a new qgis using a new diagram type crashing when opened in earlier
qgis versions
  • Loading branch information
nyalldawson committed Nov 23, 2019
1 parent 249d38a commit 6db6ede
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/qgsdiagramrenderer.cpp
Expand Up @@ -536,6 +536,11 @@ void QgsDiagramRenderer::_readXml( const QDomElement &elem, const QgsReadWriteCo
{
mDiagram.reset( new QgsHistogramDiagram() );
}
else
{
// unknown diagram type -- default to histograms
mDiagram.reset( new QgsHistogramDiagram() );
}
mShowAttributeLegend = ( elem.attribute( QStringLiteral( "attributeLegend" ), QStringLiteral( "1" ) ) != QLatin1String( "0" ) );
}

Expand Down

0 comments on commit 6db6ede

Please sign in to comment.