From 48a56cd3f243a5a0733ce0ad43632964bc6a561530abc092b5ca1c8f35ee71df Mon Sep 17 00:00:00 2001 From: copecone Date: Tue, 6 Oct 2026 01:09:05 +0900 Subject: [PATCH] Fix `NullReferenceException` from `PlanetRendererPatch.OverrideColor` --- Patch/Game/PlanetRendererPatch.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } }