Fix some NREs with the sun

This commit is contained in:
Nick 2023-07-16 14:58:41 -04:00
parent 25b3c422ee
commit c8f0d9c753

View File

@ -49,6 +49,8 @@ namespace NewHorizons.Components.Stars
public static void RemoveStar(StarController star)
{
if (Instance == null) return;
NHLogger.LogVerbose($"Removing star from list: {star?.gameObject?.name}");
if (Instance._stars.Contains(star))
{
@ -74,7 +76,7 @@ namespace NewHorizons.Components.Stars
public static void RemoveStarLight(Light light)
{
if (light != null && Instance._lights.Contains(light))
if (Instance != null && light != null && Instance._lights.Contains(light))
{
Instance._lights.Remove(light);
}