diff --git a/HeuristicLab.Tests/HeuristicLab-3.3/Samples/SamplesUtils.cs b/HeuristicLab.Tests/HeuristicLab-3.3/Samples/SamplesUtils.cs index b511bbbcd8..6099fba9ab 100644 --- a/HeuristicLab.Tests/HeuristicLab-3.3/Samples/SamplesUtils.cs +++ b/HeuristicLab.Tests/HeuristicLab-3.3/Samples/SamplesUtils.cs @@ -20,7 +20,7 @@ public static void RunAlgorithm(IAlgorithm a) { a.ExceptionOccurred += (sender, e) => { ex = e.Value; }; a.Prepare(); a.Start(); - Assert.IsNull(ex, ex.ToString()); + Assert.IsNull(ex, ex?.ToString()); } public static double GetDoubleResult(IAlgorithm a, string resultName) {