Skip to content

Commit

Permalink
[temporal] Don't connect the temporal indicator for layers missing te…
Browse files Browse the repository at this point in the history
…mporal properties
  • Loading branch information
nirvn authored and nyalldawson committed Mar 10, 2020
1 parent db73faa commit 82748a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgslayertreeviewtemporalindicator.cpp
Expand Up @@ -30,7 +30,7 @@ QgsLayerTreeViewTemporalIndicatorProvider::QgsLayerTreeViewTemporalIndicatorProv

void QgsLayerTreeViewTemporalIndicatorProvider::connectSignals( QgsMapLayer *layer )
{
if ( !( qobject_cast<QgsVectorLayer *>( layer ) || qobject_cast<QgsRasterLayer *>( layer ) ) )
if ( !( qobject_cast<QgsVectorLayer *>( layer ) || qobject_cast<QgsRasterLayer *>( layer ) ) || !layer->temporalProperties() )
return;

connect( layer->temporalProperties(), &QgsMapLayerTemporalProperties::changed, this, [ this, layer ]( ) { this->onLayerChanged( layer ); } );
Expand Down

0 comments on commit 82748a5

Please sign in to comment.