Skip to content

Fix: Prevent null dereference in AI team home location check#384

Open
seer-by-sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/ai-team-null-check
Open

Fix: Prevent null dereference in AI team home location check#384
seer-by-sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/ai-team-null-check

Conversation

@seer-by-sentry
Copy link

Fixes CLIENT-415. The issue was that: AIPlayer::onUnitProduced passes a dangling pointer to Object::setTeam due to concurrent Team object deallocation after a null check.

  • Added a null check for 'team->m_team' before accessing its members to prevent potential crashes.
  • Applied the fix in both Generals and GeneralsMD AIPlayer.cpp files.

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

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