mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-19 15:51:52 +00:00
Add null checks
This commit is contained in:
1 parent
12b4111645
commit
b068725a21
2 files changed
+4
-1
No files matched your search
@@ -126,7 +126,7 @@ internal class PlayerInfoDisplay : MonoBehaviour
|
||||
if (Time.frameCount - _lastUpdateFrame < UPDATE_COOLDOWN)
|
||||
return;
|
||||
|
||||
if (_player == null || _player.Data == null || _nameText == null)
|
||||
if (_player == null || _player.Data == null || _player.Data.ExtendedData() == null || _nameText == null)
|
||||
{
|
||||
ResetText();
|
||||
return;
|
||||
|
||||
@@ -186,6 +186,9 @@ internal static class GameSummaryPatch
|
||||
|
||||
foreach (var playerData in playersData)
|
||||
{
|
||||
if (playerData == null)
|
||||
continue;
|
||||
|
||||
var playerLine = BuildPlayerLine(playerData);
|
||||
stringBuilder.AppendLine($"- {playerLine}\n");
|
||||
Logger_.Log(playerLine.Replace("\n", " "), "GameSummary");
|
||||
|
||||
Reference in new issue
Block a user