add null checks

This commit is contained in:
D1GQ committed 2026-01-11 13:55:03 -06:00
1 parent d31d5f936f
commit 4c66116838
1 file changed
+6
+6
View File
@@ -97,6 +97,12 @@ internal class PlayerInfoDisplay : MonoBehaviour
if (Time.frameCount - _lastUpdateFrame < UPDATE_COOLDOWN)
return;
if (_player == null || _player.Data == null || _nameText == null)
{
ResetText();
return;
}
_sbTag.Clear();
_sbTagTop.Clear();
_sbTagBottom.Clear();