Skip to content
Permalink
Browse files

Don't crash if embedded group cannot be loaded (Fix #7872)

  • Loading branch information
m-kuhn committed Jun 12, 2013
1 parent b3d184d commit 8024df7c934eb9ae159f51ffc0653e8677cb2aff
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/app/legend/qgslegend.cpp
@@ -1845,11 +1845,14 @@ bool QgsLegend::readXML( QgsLegendGroup *parent, const QDomNode &node )
if ( childelem.attribute( "embedded" ) == "1" )
{
theGroup = addEmbeddedGroup( name, QgsProject::instance()->readPath( childelem.attribute( "project" ) ) );
if ( childelem.hasAttribute( "drawingOrder" ) )
if ( theGroup )
{
theGroup->setDrawingOrder( childelem.attribute( "drawingOrder" ).toInt() );
if ( childelem.hasAttribute( "drawingOrder" ) )
{
theGroup->setDrawingOrder( childelem.attribute( "drawingOrder" ).toInt() );
}
updateGroupCheckStates( theGroup );
}
updateGroupCheckStates( theGroup );
}
else
{

0 comments on commit 8024df7

Please sign in to comment.
You can’t perform that action at this time.