Don't reset previous window event handler in PopEventHandler().
This is harmless but also useless as the previous event handler of a wxWindow is always NULL anyhow, so simply don't do this. This is consistent with PushEventHandler() which doesn't call SetPreviousHandler() for the window itself neither. Closes #14353. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71621 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1439,6 +1439,10 @@ wxEvtHandler *wxWindowBase::PopEventHandler(bool deleteHandler)
|
||||
"the first handler of the wxWindow stack should have non-NULL next handler" );
|
||||
|
||||
firstHandler->SetNextHandler(NULL);
|
||||
|
||||
// It is harmless but useless to unset the previous handler of the window
|
||||
// itself as it's always NULL anyhow, so don't do this.
|
||||
if ( secondHandler != this )
|
||||
secondHandler->SetPreviousHandler(NULL);
|
||||
|
||||
// now firstHandler is completely unlinked; set secondHandler as the new window event handler
|
||||
|
Reference in New Issue
Block a user