Add null checks

This commit is contained in:
D1GQ committed 2026-06-24 00:45:36 -05:00
1 parent 12b4111645
commit b068725a21
2 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -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");