Skip to content

Fix potential crash in AI build logic when thing template is not found - #195

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

Fix potential crash in AI build logic when thing template is not found#195
seer-by-sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/ai-template-null-check

Conversation

@seer-by-sentry

@seer-by-sentry seer-by-sentry Bot commented Jan 3, 2026

Copy link
Copy Markdown

Fixes CLIENT-1D5. The issue was that: AIPlayer::buildBySupplies dereferences ThingTemplate pointer before null check, causing access violation when template lookup fails.

  • Added a null check for the thing template (tTemplate) before attempting to call isKindOf(KINDOF_CASH_GENERATOR) in the AI player's building placement logic. This prevents a potential crash if TheThingFactory->findTemplate(thingName) returns null.

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

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