Skip to content

Commit

Permalink
Fix crash when selecting geometryless layer and style widget is open
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 10, 2016
1 parent 22acf3b commit 5306f55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/qgsmapstylingwidget.cpp
Expand Up @@ -98,9 +98,9 @@ QgsMapStylingWidget::QgsMapStylingWidget( QgsMapCanvas* canvas, QWidget *parent

void QgsMapStylingWidget::setLayer( QgsMapLayer *layer )
{
if ( !layer )
if ( !layer || !layer->isSpatial() )
{
mLayerTitleLabel->setText( "" );
mLayerTitleLabel->clear();
mStackedWidget->setCurrentIndex( mNotSupportedPage );
return;
}
Expand Down

1 comment on commit 5306f55

@NathanW2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Please sign in to comment.