Skip to content

Commit 3918081

Browse files
committed
* **FIX**: TestFlightHUD tries to access an invalid MasterStatusItem if CurrentVessel isn't tracked, or vessel change occurs. Should fix #155
1 parent 3064dbb commit 3918081

File tree

6 files changed

+3
-0
lines changed

6 files changed

+3
-0
lines changed
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

TestFlightCore/TestFlightCore/TestFlightHUD.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ internal override void DrawWindow(Int32 id)
8686

8787
// Display information on active vessel
8888
Guid currentVessl = FlightGlobals.ActiveVessel.id;
89+
if (!masterStatus.ContainsKey(currentVessl))
90+
return;
91+
8992
// if (masterStatus[currentVessl].allPartsStatus.Count(ps => ps.activeFailure != null) < lastPartCount)
9093
if (masterStatus[currentVessl].allPartsStatus.Count < lastPartCount)
9194
{

0 commit comments

Comments
 (0)