Deltares / imod-qgis

🗺️🧭 QGIS plugin for iMOD
GNU General Public License v2.0
7 stars 1 forks source link

Time series widget: raises a Python error when closing without specified layer #26

Closed Huite closed 1 year ago

Huite commented 2 years ago

This line is the problem:

if layer.type() == QgsMapLayerType.VectorLayer:

layer is None, if no time series layer is present. This line should be gated by a check:

if (layer is not None) and (layer.type() == QgsMapLayerType.VectorLayer):