HydraulicStructures: fix crash when selecting a rk before the reach

This commit is contained in:
Dylan Jeannin committed 2026-10-23 13:37:03 +02:00
1 parent cdeca8a2e8
commit d8d1b4cd1f
1 file changed
+2 -1
+2 -1
View File
@@ -96,7 +96,8 @@ class ComboBoxDelegate(QItemDelegate):
reach = self._data.hydraulic_structures\
.get(index.row())\
.input_reach
profiles = list(
# No reach selected yet: no profile to choose from
profiles = [] if reach is None else list(
filter(
lambda p: p.display_name() == text,
reach.reach.profiles