Skip to content

Commit

Permalink
Fix IsNotVessel
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanKell committed Oct 12, 2023
1 parent 732a7a5 commit e74b081
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace ContractConfigurator.Parameters
/// </summary>
public class IsNotVessel : VesselParameter
{
protected List<string> vessels { get; set; }
protected List<string> vessels { get; set; } = new List<string>();

public IsNotVessel()
: this(null, null)
Expand All @@ -28,7 +28,8 @@ public IsNotVessel(List<string> vessels, string title)
failWhenUnmet = true;
fakeFailures = true;

this.vessels = vessels ?? new List<string>();
if (vessels != null)
this.vessels = vessels;
}

protected override string GetParameterTitle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace ContractConfigurator
/// </summary>
public class IsNotVesselFactory : ParameterFactory
{
protected List<VesselIdentifier> vessels;
protected List<VesselIdentifier> vessels = new List<VesselIdentifier>();

public override bool Load(ConfigNode configNode)
{
Expand Down

0 comments on commit e74b081

Please sign in to comment.