Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/StochasticSoilProfileReader.cs =================================================================== diff -u -rdc338e85283e37af4984f737a9f7ae0d213596be -rcdc41931db8cd6fbebe910c08d315d1b7066a6d2 --- Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/StochasticSoilProfileReader.cs (.../StochasticSoilProfileReader.cs) (revision dc338e85283e37af4984f737a9f7ae0d213596be) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/StochasticSoilProfileReader.cs (.../StochasticSoilProfileReader.cs) (revision cdc41931db8cd6fbebe910c08d315d1b7066a6d2) @@ -61,9 +61,19 @@ /// public bool HasNext { get; private set; } - + /// + /// Reads the information for the next stochastic soil profile from the database and creates a + /// instance of the information. + /// + /// Identifier of the next to look for. + /// The next from the database, or null if no more soil profiles can be read. + /// Thrown when the database returned incorrect values for required properties. public StochasticSoilProfile ReadStochasticSoilProfile(long stochasticSoilModelId) { + if (!HasNext) + { + return null; + } MoveToStochasticSoilModelId(stochasticSoilModelId); try