Skip to content

Commit

Permalink
Fix #1 issue on NullReferenceException spam
Browse files Browse the repository at this point in the history
  • Loading branch information
KSP-TaxiService committed Mar 19, 2017
1 parent 608fdf6 commit 3d095ae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/CommNetConstellation/CommNetLayer/CNCCommNetScenario.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,9 @@ public Vessel findCorrespondingVessel(CommNode commNode)
{
cacheCommNetVessels();

IEqualityComparer<CommNode> comparer = commNode.Comparer;
return commVessels.Find(x => comparer.Equals(commNode, x.Comm)).Vessel;
return commVessels.Find(x => x.Comm.precisePosition == commNode.precisePosition).Vessel; // more specific equal
//IEqualityComparer<CommNode> comparer = commNode.Comparer; // a combination of third-party mods somehow affects CommNode's IEqualityComparer on two objects
//return commVessels.Find(x => comparer.Equals(commNode, x.Comm)).Vessel;
}

/// <summary>
Expand Down

0 comments on commit 3d095ae

Please sign in to comment.