Skip to content

AI: Add null check for enemy player before accessing its properties - #132

Open
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix-ai-null-enemy
Open

AI: Add null check for enemy player before accessing its properties#132
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix-ai-null-enemy

Conversation

@seer-by-sentry

Copy link
Copy Markdown

Fixes CLIENT-V5. The issue was that: AIPlayer::guardSupplyCenter dereferences NULL pointer returned by getSkirmishEnemyPlayer without validation.

  • Added a null check for the enemy player pointer before attempting to access its player index or structure bounds.
  • This prevents potential crashes if the enemy player is not properly initialized or has been destroyed.

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

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