Skip to content

Commit f3a11b4

Browse files
committed
Fix NRE in GetHashCode for unloaded vessels
Can be triggered by using an unloaded vessel as a key in lexicons and uniquesets
1 parent 8f281a4 commit f3a11b4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/kOS/Suffixed/VesselTarget.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ public override bool Equals(object obj)
550550

551551
public override int GetHashCode()
552552
{
553-
return Vessel.rootPart.flightID.GetHashCode();
553+
return Vessel.id.GetHashCode();
554554
}
555555

556556
public static bool operator ==(VesselTarget left, VesselTarget right)

0 commit comments

Comments
 (0)