Skip to content

Commit f17de37

Browse files
committed
[AutoML] return null instead of null ref crash on Model property accessor (dotnet#3620)
* return null instead of null ref crash on Model property accessor
1 parent 368734b commit f17de37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Microsoft.ML.AutoML/API/RunDetails/RunDetail.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public sealed class RunDetail<TMetrics> : RunDetail
3636
/// <remarks>
3737
/// You can use the trained model to obtain predictions on input data.
3838
/// </remarks>
39-
public ITransformer Model { get { return _modelContainer.GetModel(); } }
39+
public ITransformer Model { get { return _modelContainer?.GetModel(); } }
4040

4141
/// <summary>
4242
/// Exception encountered during the run. This property is <see langword="null"/> if

0 commit comments

Comments
 (0)