Fix NullReferenceException from PlanetRendererPatch.OverrideColor

This commit is contained in:
copecone committed 2026-10-06 01:09:05 +09:00
1 parent 63f38883c8
commit 48a56cd3f2
1 file changed
+2 -2
+2 -2
View File
@@ -21,9 +21,9 @@ public static class PlanetRendererPatch
return; 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); planetColor = new PlanetColor(customColor.Value);
} }
} }