From 693d8386ad24486a36bff6bc08f69fa1dc95a2c7 Mon Sep 17 00:00:00 2001 From: _nebula <41904486+misternebula@users.noreply.github.com> Date: Tue, 31 Oct 2023 17:50:09 +0000 Subject: [PATCH] add null check to QSBDitheringAnimator --- QSB/PlayerBodySetup/Remote/QSBDitheringAnimator.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/QSB/PlayerBodySetup/Remote/QSBDitheringAnimator.cs b/QSB/PlayerBodySetup/Remote/QSBDitheringAnimator.cs index 6889e7fad..40933fdad 100644 --- a/QSB/PlayerBodySetup/Remote/QSBDitheringAnimator.cs +++ b/QSB/PlayerBodySetup/Remote/QSBDitheringAnimator.cs @@ -59,6 +59,10 @@ private void Update() private void UpdateRenderers() { + _renderers ??= GetComponentsInChildren(true) + .Select(x => (x.gameObject.GetAddComponent(), x.shadowCastingMode != ShadowCastingMode.Off)) + .ToArray(); + foreach (var (renderer, updateShadows) in _renderers) { if (renderer == null)