Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityCommonHelper.cs =================================================================== diff -u -r5330 -r5443 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityCommonHelper.cs (.../MacroStabilityCommonHelper.cs) (revision 5330) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/KernelWrappers/MacroStabilityCommon/MacroStabilityCommonHelper.cs (.../MacroStabilityCommonHelper.cs) (revision 5443) @@ -456,9 +456,9 @@ { ThrowWhenSoilProfile2DIsNull(subSoilScenario); - if (surfaceLine2 == null) + if (surfaceLine2 == null || surfaceLine2.Geometry == null || surfaceLine2.Geometry.Count < 2) { - throw new ArgumentNullException(nameof(surfaceLine2), @"SurfaceLine cannot be null."); + throw new ArgumentNullException(nameof(surfaceLine2), @"SurfaceLine cannot be null and must have a valid geometry."); } if (dikeEmbankmentSoil == null) @@ -471,7 +471,7 @@ throw new InvalidOperationException(@"SurfaceLine is (partly) below the bottom of the SoilProfile2D."); } - if (!SurfaceLine2Validator.AreAllCharacteristicPointsXCoordinatesAscending(surfaceLine2)) + if (!SurfaceLine2Validator.AreAllPointsXCoordinatesAscending(surfaceLine2)) { throw new InvalidOperationException(@"SurfaceLine points are not strictly ascending"); }