mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
add null checks
This commit is contained in:
1 parent
d31d5f936f
commit
4c66116838
1 file changed
+6
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user