From 375a18e401dfc0ebc3437126bb8909f4639ac940 Mon Sep 17 00:00:00 2001 From: Noah Pilarski Date: Mon, 1 Jan 2024 23:59:41 -0500 Subject: [PATCH] silly error --- NewHorizons/Handlers/PlanetCreationHandler.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/NewHorizons/Handlers/PlanetCreationHandler.cs b/NewHorizons/Handlers/PlanetCreationHandler.cs index 26e8eef6..a778b8ad 100644 --- a/NewHorizons/Handlers/PlanetCreationHandler.cs +++ b/NewHorizons/Handlers/PlanetCreationHandler.cs @@ -949,7 +949,13 @@ namespace NewHorizons.Handlers { flag = false; // idk why we wait here but we do - Delay.FireInNUpdates(() => childObj.gameObject.SetActive(false), 2); + Delay.FireInNUpdates(() => + { + if (childObj != null && childObj.gameObject != null) + { + childObj.gameObject.SetActive(false); + } + }, 2); } if (flag) NHLogger.LogWarning($"Couldn't find \"{childPath}\".");