Skip to content

Commit 8501e3a

Browse files
committed
Fix ship controller OnDestroy error
1 parent 5395519 commit 8501e3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/KerbalCombatSystems/ShipController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public void OnDestroy()
226226
{
227227
GameEvents.onEditorPartEvent.Remove(UpdateAttachment);
228228

229-
if (HighLogic.LoadedSceneIsFlight && !vessel.packed && alive)
229+
if (HighLogic.LoadedSceneIsFlight && vessel != null && !vessel.packed && alive)
230230
{
231231
alive = false;
232232
DeathMessage(true);

0 commit comments

Comments
 (0)