Fix crash in wxAuiTabCtrl due to use of invalid m_hoverButton (PR #25960)

13 views
Skip to first unread message

VZ

unread,
Nov 7, 2025, 9:49:41 AM (2 days ago) Nov 7
to wx-...@googlegroups.com, Subscribed

This pointer could become invalid if the page containing it was destroyed (typically, although not necessarily, as the result of clicking on this button itself) and using it when handling the next WXEVT_MOTION event resulted in a crash.

Avoid the problem by removing this pointer and replacing its use with FindHoverButton() that finds the (only) button in hover state.

Also add ResetHoverButton() helper which uses FindHoverButton() and resets the state of the button and updates the window if necessary.

Closes #25959.


You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/25960

Commit Summary

  • 6199a76 Fix crash in wxAuiTabCtrl due to use of invalid m_hoverButton

File Changes

(2 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25960@github.com>

VZ

unread,
Nov 7, 2025, 11:45:03 AM (2 days ago) Nov 7
to wx-...@googlegroups.com, Push

@vadz pushed 7 commits.

  • 7c0354f Remove potentially dangling m_pressedButton too
  • 26c2445 Remove just added ResetHoverButton()
  • 51790f7 Add helper functions for updating wxAuiTabContainerButton state
  • 7caf1f4 Fix appearance of pressed buttons being hovered on
  • b622025 Reuse existing position variable in wxAuiTabCtrl::OnMotion()
  • 82dbd5e Fix mouse handling while moving over buttons in wxAuiTabCtrl
  • 469ca1b Reset hover and pressed buttons on mouse capture loss


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25960/before/6199a76814aef4e26618795412a3aa79462dd730/after/469ca1b9ba59bcfd81dee1b0de64b2df3b998a41@github.com>

VZ

unread,
Nov 8, 2025, 7:25:44 PM (12 hours ago) Nov 8
to wx-...@googlegroups.com, Subscribed

Merged #25960 into master.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/25960/issue_event/20814774189@github.com>

Reply all
Reply to author
Forward
0 new messages