Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/DikeProfile.cs =================================================================== diff -u -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab -re3f9dffa91a0def0b6e6bc7dfabef74cc64745c5 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/DikeProfile.cs (.../DikeProfile.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/DikeProfile.cs (.../DikeProfile.cs) (revision e3f9dffa91a0def0b6e6bc7dfabef74cc64745c5) @@ -145,12 +145,13 @@ throw new ArgumentNullException("points", Resources.DikeProfile_SetGeometry_Collection_of_points_for_geometry_is_null); } - if (points.Any(p => p == null)) + var roughnessPoints = points.ToArray(); + if (roughnessPoints.Any(p => p == null)) { throw new ArgumentException(Resources.DikeProfile_SetGeometry_A_point_in_the_collection_is_null); } - DikeGeometry = points.ToArray(); + DikeGeometry = roughnessPoints; } private void SetForeshoreGeometry(IEnumerable points) @@ -160,12 +161,13 @@ throw new ArgumentNullException("points", Resources.DikeProfile_SetForeshoreGeometry_Collection_of_points_for_foreshore_geometry_is_null); } - if (points.Any(p => p == null)) + var foreshorePoints = points.ToArray(); + if (foreshorePoints.Any(p => p == null)) { throw new ArgumentException(Resources.DikeProfile_SetForeshoreGeometry_A_point_in_the_collection_is_null); } - ForeshoreGeometry = new RoundedPoint2DCollection(2, points); + ForeshoreGeometry = new RoundedPoint2DCollection(2, foreshorePoints); } ///