Skip to content

Commit

Permalink
avoid NRE on flight startup because it's possible for OnUpdate to be …
Browse files Browse the repository at this point in the history
…called before Start
  • Loading branch information
JonnyOThan committed May 15, 2023
1 parent ce40e56 commit 8638fa6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ public override void OnLoad(ConfigNode node)
moduleConfig.Node = node;
}

public void Start()
public override void OnAwake()
{
if (HighLogic.LoadedSceneIsEditor)
if (!HighLogic.LoadedSceneIsFlight)
{
return;
}
Expand Down

0 comments on commit 8638fa6

Please sign in to comment.