Skip to content

Commit

Permalink
fix legend crash
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jan 22, 2015
1 parent 221e9ef commit 956e83f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/layertree/qgslayertreemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,9 @@ int QgsLayerTreeModel::legendRootRowCount( QgsLayerTreeLayer* nL ) const
if ( legendEmbeddedInParent( nL ) )
return 0;

if ( !mLegend.contains( nL ) )
return 0;

const LayerLegendData& data = mLegend[nL];
if ( data.tree )
return data.tree->children[0].count();
Expand Down

0 comments on commit 956e83f

Please sign in to comment.