Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[temporal] Never assume a layer has temporal properties, it crashes
  • Loading branch information
nirvn committed Apr 6, 2020
1 parent 827f0a1 commit 3bb03f6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gui/qgstemporalcontrollerwidget.cpp
Expand Up @@ -158,7 +158,10 @@ void QgsTemporalControllerWidget::onLayersAdded()
{
QVector<QgsMapLayer *> layers = QgsProject::instance()->layers<QgsMapLayer *>();
for ( QgsMapLayer *layer : layers )
mHasTemporalLayersLoaded |= layer->temporalProperties()->isActive();
{
if ( layer->temporalProperties() )
mHasTemporalLayersLoaded |= layer->temporalProperties()->isActive();
}

if ( mHasTemporalLayersLoaded )
setDatesToProjectTime();
Expand Down

0 comments on commit 3bb03f6

Please sign in to comment.