Skip to content

Commit dd851a1

Browse files
committed
Don't run setup outside of loading screen
KSP tries to re-instantiate all addons ona a database reload. It NREs because the loading screen doesn't exist anymore. None of this stuff needs to be run again.
1 parent 458b486 commit dd851a1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

ModuleManager/ModuleManager.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ public static void Log(String s)
6060

6161
internal void Awake()
6262
{
63+
if (LoadingScreen.Instance == null)
64+
{
65+
Destroy(gameObject);
66+
return;
67+
}
68+
6369
totalTime.Start();
6470

6571
// Allow loading the background in the laoding screen

0 commit comments

Comments
 (0)