Skip to content

Fix: Prevent null dereference for object template in script conditions#391

Open
seer-by-sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/script-conditions-obj-template-null-check
Open

Fix: Prevent null dereference for object template in script conditions#391
seer-by-sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/script-conditions-obj-template-null-check

Conversation

@seer-by-sentry
Copy link

Fixes CLIENT-42B. The issue was that: Dereferencing null ThingTemplate from Object::getTemplate() within ScriptConditions::evaluatePlayerHasUnitTypeInArea causes read access violation.

  • Added a null check for pObj->getTemplate() within the team member iteration loop in ScriptConditions.cpp.
  • This prevents potential crashes if an object in the team's member list has a null template.

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

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