mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Fix some NREs with the sun
This commit is contained in:
parent
25b3c422ee
commit
c8f0d9c753
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user