Skip to content

Commit

Permalink
Fix NRE in NHSupernovaPlanetEffectController that happens with vanill…
Browse files Browse the repository at this point in the history
…a bodies (#890)

## Bug fixes

- Fixed an NRE in NHSupernovaPlanetEffectController that happens with
vanilla bodies
  • Loading branch information
xen-42 committed Jun 13, 2024
2 parents 4c36a32 + 746c842 commit e55818b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ public void Update()
{
for (int i = 0; i < _ambientLight.Length; i++)
{
_ambientLight[i].intensity = _ambientLightOrigIntensity[i] * (1f - collapseProgress);
var ambientLight = _ambientLight[i];
if (ambientLight != null)
{
ambientLight.intensity = _ambientLightOrigIntensity[i] * (1f - collapseProgress);
}
}
}

Expand Down

0 comments on commit e55818b

Please sign in to comment.