Skip to content

Commit

Permalink
add null check to QSBDitheringAnimator
Browse files Browse the repository at this point in the history
  • Loading branch information
misternebula committed Oct 31, 2023
1 parent d3d32c1 commit 693d838
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions QSB/PlayerBodySetup/Remote/QSBDitheringAnimator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ private void Update()

private void UpdateRenderers()
{
_renderers ??= GetComponentsInChildren<Renderer>(true)
.Select(x => (x.gameObject.GetAddComponent<OWRenderer>(), x.shadowCastingMode != ShadowCastingMode.Off))
.ToArray();

foreach (var (renderer, updateShadows) in _renderers)
{
if (renderer == null)
Expand Down

0 comments on commit 693d838

Please sign in to comment.