[ wxwindows-Patches-1727956 ] [2.8] Fix crash after destroying a
default button
SourceForge.net
noreply at sourceforge.net
Sat Jun 2 06:24:59 PDT 2007
Patches item #1727956, was opened at 2007-05-30 01:10
Message generated for change (Comment added) made by vadz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1727956&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: bug fix
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Tim Kosse (botg)
Assigned to: Nobody/Anonymous (nobody)
>Summary: [2.8] Fix crash after destroying a default button
Initial Comment:
Steps to reproduce the crash under Windows (did not try other platforms):
- Create panel with two buttons. First button should be made the default button.
- Click the other button so it becomes the "temporary default item"
- Destroy panel
The default button gets destroyed first. Next, the other button, which is the temporary default item, gets destroyed. Hence wxButton::UnsetTmpDefault gets called.
UnsetTmpDefault unsets the temp default item and then accesses the previously destroyed default button, leading to the crash.
A temporary default item masks the real default item if calling wxTopLevelWindow::GetDefaultItem
Due to this, if a default item gets destroyed, the check in wxWindowBase::~wxWindowBase() if it's the default item does not work.
----------------------------------------------------------------------
>Comment By: Vadim Zeitlin (vadz)
Date: 2007-06-02 15:24
Message:
Logged In: YES
user_id=71618
Originator: NO
Applied, thanks!
----------------------------------------------------------------------
Comment By: Tim Kosse (botg)
Date: 2007-05-30 01:11
Message:
Logged In: YES
user_id=156254
Originator: YES
I noticed that this patch basically does the same as the change done in
HEAD labeled with "handle child destruction notifications in wxTLW itself
and reset both normal and temporary default item pointers when the default
window is destroyed"
This patch however does not add a new function and thus should be fully
backwards compatible.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1727956&group_id=9863
More information about the wx-dev
mailing list