Skip to content

bugfix(gui): Guard against empty selected drawables list access in ControlBar#467

Open
seer-by-sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/controlbar-empty-selection
Open

bugfix(gui): Guard against empty selected drawables list access in ControlBar#467
seer-by-sentry[bot] wants to merge 1 commit intomainfrom
seer/fix/controlbar-empty-selection

Conversation

@seer-by-sentry
Copy link
Copy Markdown

Fixes CLIENT-3ZY. The issue was that: Dangling pointer dereference in ControlBar::setPortraitByObject during UI update, accessing freed Object memory via isKindOf.

  • Added a check for an empty selectedDrawables list before attempting to access its front() element.
  • Prevents potential crashes or undefined behavior if the selection list is empty during evaluation in the ControlBar.
  • Applied to ControlBar.cpp in both Generals and GeneralsMD game versions.

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

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