Skip to content

Commit

Permalink
Fix incorrect behavior when FuelTable is null.
Browse files Browse the repository at this point in the history
  • Loading branch information
JetStream96 committed Apr 15, 2018
1 parent 074c10b commit 51d7ad0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/QSP/FuelCalculation/FuelData/IFuelTableExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
{
public static class IFuelTableExtension
{
/// <summary>
/// Returns null if f is null.
/// </summary>
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
Expand Down

0 comments on commit 51d7ad0

Please sign in to comment.