diff --git a/src/View/Geometry/PlotKPZ.py b/src/View/Geometry/PlotKPZ.py index 1c80af12abae4b103a01569fb08b5e5685eba76d..651a675879480bf55db3342b4f7dff5a2e54a937 100644 --- a/src/View/Geometry/PlotKPZ.py +++ b/src/View/Geometry/PlotKPZ.py @@ -191,7 +191,10 @@ class PlotKPZ(PamhyrPlot): def draw_profiles_hs(self, reach): lhs = filter( lambda hs: hs._input_reach.reach is reach, - self._study.river.hydraulic_structures.lst + filter( + lambda hs: hs._input_reach is not None, + self._study.river.hydraulic_structures.lst + ) ) for hs in lhs: diff --git a/src/View/Results/PlotKPC.py b/src/View/Results/PlotKPC.py index 77e101dc2cd7c6096d111555c2cbd3abdbcd630d..74c08059f037b988c6850baf796368de28d488f9 100644 --- a/src/View/Results/PlotKPC.py +++ b/src/View/Results/PlotKPC.py @@ -109,7 +109,10 @@ class PlotKPC(PamhyrPlot): def draw_profiles_hs(self, reach): lhs = filter( lambda hs: hs._input_reach.reach is reach.geometry, - self.results.study.river.hydraulic_structures.lst + filter( + lambda hs: hs._input_reach is not None, + self.results.study.river.hydraulic_structures.lst + ) ) for hs in lhs: