File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -782,14 +782,17 @@ QgsProcessingMeshDatasetGroupsParameterDefinitionWidget::QgsProcessingMeshDatase
782
782
783
783
const QgsProcessingParameterMeshDatasetGroups *datasetGroupDef =
784
784
static_cast < const QgsProcessingParameterMeshDatasetGroups *>( definition );
785
- int currentIndex = mParentLayerComboBox ->findData ( datasetGroupDef->meshLayerParameterName () );
786
- if ( currentIndex != -1 )
787
- mParentLayerComboBox ->setCurrentIndex ( currentIndex );
788
- else if ( !datasetGroupDef->meshLayerParameterName ().isEmpty () )
789
- {
790
- // if no layer parameter candidates found, we just add the existing one as a placeholder
791
- mParentLayerComboBox ->addItem ( datasetGroupDef->meshLayerParameterName (), datasetGroupDef->meshLayerParameterName () );
792
- mParentLayerComboBox ->setCurrentIndex ( mParentLayerComboBox ->count () - 1 );
785
+ if ( datasetGroupDef )
786
+ {
787
+ int currentIndex = mParentLayerComboBox ->findData ( datasetGroupDef->meshLayerParameterName () );
788
+ if ( currentIndex != -1 )
789
+ mParentLayerComboBox ->setCurrentIndex ( currentIndex );
790
+ else if ( !datasetGroupDef->meshLayerParameterName ().isEmpty () )
791
+ {
792
+ // if no layer parameter candidates found, we just add the existing one as a placeholder
793
+ mParentLayerComboBox ->addItem ( datasetGroupDef->meshLayerParameterName (), datasetGroupDef->meshLayerParameterName () );
794
+ mParentLayerComboBox ->setCurrentIndex ( mParentLayerComboBox ->count () - 1 );
795
+ }
793
796
}
794
797
795
798
setLayout ( vlayout );
You can’t perform that action at this time.
0 commit comments