From f3a11b4ce25882d2950ef4f1cddbcc6dfb7855ca Mon Sep 17 00:00:00 2001 From: sug44 Date: Thu, 14 May 2026 15:16:43 +0300 Subject: [PATCH] Fix NRE in GetHashCode for unloaded vessels Can be triggered by using an unloaded vessel as a key in lexicons and uniquesets --- src/kOS/Suffixed/VesselTarget.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kOS/Suffixed/VesselTarget.cs b/src/kOS/Suffixed/VesselTarget.cs index 1ab591fd4..d5adefc29 100644 --- a/src/kOS/Suffixed/VesselTarget.cs +++ b/src/kOS/Suffixed/VesselTarget.cs @@ -550,7 +550,7 @@ public override bool Equals(object obj) public override int GetHashCode() { - return Vessel.rootPart.flightID.GetHashCode(); + return Vessel.id.GetHashCode(); } public static bool operator ==(VesselTarget left, VesselTarget right)