SHA256
Fix NullReferenceException from PlanetRendererPatch.OverrideColor
This commit is contained in:
1 file changed
+2
-2
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user