diff --git a/Patch/Game/PlanetRendererPatch.cs b/Patch/Game/PlanetRendererPatch.cs index bba0c31..dee017d 100644 --- a/Patch/Game/PlanetRendererPatch.cs +++ b/Patch/Game/PlanetRendererPatch.cs @@ -21,9 +21,9 @@ public static class PlanetRendererPatch return; - void ApplyColor(ref PlanetColor planetColor, scrPlanet targetPlanet, Color? customColor) + void ApplyColor(ref PlanetColor planetColor, scrPlanet? targetPlanet, Color? customColor) { - if (__instance == targetPlanet.planetRenderer && customColor != null) + if (targetPlanet != null && __instance == targetPlanet.planetRenderer && customColor != null) planetColor = new PlanetColor(customColor.Value); } }