Skip to content

Commit

Permalink
Fix crash when opening vector properties on geometryless layer
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 30, 2018
1 parent aa44334 commit 5017e94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgsvectorlayerlegendwidget.cpp
Expand Up @@ -90,7 +90,7 @@ void QgsVectorLayerLegendWidget::populateLegendTreeView( const QHash<QString, QS
model->setColumnCount( 2 );
model->setHorizontalHeaderLabels( QStringList() << tr( "Symbol" ) << tr( "Text" ) );

const QgsLegendSymbolList lst = mLayer->renderer()->legendSymbolItems();
const QgsLegendSymbolList lst = mLayer->renderer() ? mLayer->renderer()->legendSymbolItems() : QgsLegendSymbolList();
for ( const QgsLegendSymbolItem &symbolItem : lst )
{
if ( !symbolItem.symbol() )
Expand Down

0 comments on commit 5017e94

Please sign in to comment.