From 51d7ad03a716086371e9d81a52593ed3787eb3b2 Mon Sep 17 00:00:00 2001 From: David Chen Date: Sun, 15 Apr 2018 19:08:34 +0800 Subject: [PATCH] Fix incorrect behavior when FuelTable is null. --- src/QSP/FuelCalculation/FuelData/IFuelTableExtension.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/QSP/FuelCalculation/FuelData/IFuelTableExtension.cs b/src/QSP/FuelCalculation/FuelData/IFuelTableExtension.cs index 911e8d0a..69e53c71 100644 --- a/src/QSP/FuelCalculation/FuelData/IFuelTableExtension.cs +++ b/src/QSP/FuelCalculation/FuelData/IFuelTableExtension.cs @@ -2,9 +2,12 @@ { public static class IFuelTableExtension { + /// + /// Returns null if f is null. + /// public static IFuelTable WithBias(this IFuelTable f, double bias) { - return new Helper(f, bias); + return f == null ? null : new Helper(f, bias); } private class Helper : IFuelTable