Skip to content

Fix: Clear stale drawable pointer to prevent use-after-free#381

Open
seer-by-sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/clear-stale-drawable-pointer
Open

Fix: Clear stale drawable pointer to prevent use-after-free#381
seer-by-sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/clear-stale-drawable-pointer

Conversation

@seer-by-sentry
Copy link

Fixes CLIENT-3ZY. The issue was that: ControlBar::setPortraitByObject dereferences a stale Object pointer, causing an access violation when calling Thing::isKindOf on freed memory.

  • Cleared m_currentSelectedDrawable when the currently selected drawable is destroyed.
  • Prevents use-after-free crashes by nullifying the dangling pointer.
  • Ensures m_currentSelectedDrawable is not dereferenced after the object it points to has been deleted.

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

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