Skip to content

MessageStream: Add null checks for ThePlayerList and local player before accessing player index - #76

Open
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix-messagestream-nullcheck
Open

MessageStream: Add null checks for ThePlayerList and local player before accessing player index#76
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix-messagestream-nullcheck

Conversation

@seer-by-sentry

Copy link
Copy Markdown

Fixes CLIENT-G2. The issue was that: GameMessage constructor lacks null check on global ThePlayerList pointer, causing crash during early initialization.

This change adds defensive programming to the GameMessage constructor to prevent crashes when ThePlayerList or the local player are not yet initialized. Specifically:

  • Checks if ThePlayerList and ThePlayerList->getLocalPlayer() are valid before accessing the player index.
  • If either is null, defaults to a neutral player index (0) to avoid a crash.

This fix was generated by Seer in Sentry, triggered automatically. 👁️ Run ID: 1924361

Not quite right? Click here to continue debugging with Seer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants