Skip to content

Commit

Permalink
Fix crash when selecting a null layer
Browse files Browse the repository at this point in the history
Happens for instance when a embedded layer is added but
dependent layers cannot be resolved
  • Loading branch information
Hugo Mercier committed Feb 17, 2016
1 parent a44c890 commit baaeedf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -9772,7 +9772,7 @@ void QgisApp::legendLayerSelectionChanged( void )
if ( selectedLayers.size() == 1 )
{
QgsLayerTreeLayer* l = selectedLayers.front();
if ( l->layer()->type() == QgsMapLayer::VectorLayer )
if ( l->layer() && l->layer()->type() == QgsMapLayer::VectorLayer )
{
mLegendExpressionFilterButton->setEnabled( true );
bool exprEnabled;
Expand Down

0 comments on commit baaeedf

Please sign in to comment.