Skip to content
Permalink
Browse files

Fix nullptr dereference when opening project with broken mesh provider

  • Loading branch information
rouault authored and nyalldawson committed Feb 1, 2020
1 parent 89546fc commit e37afc83d3a051797e8fb9b0d45afa4ce12779fc
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/app/mesh/qgsmeshrendereractivedatasetwidget.cpp
@@ -141,8 +141,11 @@ void QgsMeshRendererActiveDatasetWidget::setTimeRange()

void QgsMeshRendererActiveDatasetWidget::enableTimeControls()
{
const int scalarDatesets = mMeshLayer->dataProvider()->datasetCount( mActiveScalarDatasetGroup );
const int vectorDatesets = mMeshLayer->dataProvider()->datasetCount( mActiveVectorDatasetGroup );
const QgsMeshDataProvider *provider = mMeshLayer->dataProvider();
if ( !provider )
return;
const int scalarDatesets = provider->datasetCount( mActiveScalarDatasetGroup );
const int vectorDatesets = provider->datasetCount( mActiveVectorDatasetGroup );
const bool isTimeVarying = ( scalarDatesets > 1 ) || ( vectorDatesets > 1 );
mTimeComboBox->setEnabled( isTimeVarying );
mDatasetSlider->setEnabled( isTimeVarying );

0 comments on commit e37afc8

Please sign in to comment.
You can’t perform that action at this time.