Index: dam engine/trunk/src/Deltares.DamEngine.Interface/FillXmlInputFromDam.cs =================================================================== diff -u -r631 -r665 --- dam engine/trunk/src/Deltares.DamEngine.Interface/FillXmlInputFromDam.cs (.../FillXmlInputFromDam.cs) (revision 631) +++ dam engine/trunk/src/Deltares.DamEngine.Interface/FillXmlInputFromDam.cs (.../FillXmlInputFromDam.cs) (revision 665) @@ -121,6 +121,20 @@ { throw new NullReferenceException("No surfacelines defined in this project"); } + else + { + foreach (var surfaceLine in damProjectData.Dike.SurfaceLines2) + { + if ((surfaceLine.CharacteristicPoints == null) || (surfaceLine.CharacteristicPoints.Count < 1)) + { + throw new NullReferenceException($"Surfaceline '{surfaceLine.Name}' has no characteristic points"); + } + if ((surfaceLine.Geometry == null) || (surfaceLine.Geometry.Count < 2)) + { + throw new NullReferenceException($"Surfaceline '{surfaceLine.Name}' has no points"); + } + } + } if (damProjectData.Dike.SoilList == null) { throw new NullReferenceException("No soils defined in this project"); Index: dam engine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs =================================================================== diff -u -r631 -r665 --- dam engine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs (.../FillDamFromXmlInput.cs) (revision 631) +++ dam engine/trunk/src/Deltares.DamEngine.Interface/FillDamFromXmlInput.cs (.../FillDamFromXmlInput.cs) (revision 665) @@ -115,6 +115,16 @@ { throw new NullReferenceException("No surfacelines defined in the input"); } + else + { + foreach (var surfaceLine in input.SurfaceLines) + { + if ((surfaceLine.Points == null) || (surfaceLine.Points.Length < 1)) + { + throw new NullReferenceException($"Surfaceline '{surfaceLine.Name}' has no points"); + } + } + } if (input.Soils == null) { throw new NullReferenceException("No soils defined in the input");