X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec09e18d3544bb333f367db7f7e8f410d81e5b14..6d7b547184bfdcdf67790755deb0122050b1d728:/src/common/bookctrl.cpp diff --git a/src/common/bookctrl.cpp b/src/common/bookctrl.cpp index d1e7bcbe01..c0b1eedd9c 100644 --- a/src/common/bookctrl.cpp +++ b/src/common/bookctrl.cpp @@ -172,7 +172,7 @@ void wxBookCtrlBase::OnHelp(wxHelpEvent& event) // if the event object == this because the book control can have other // subcontrols inside it (e.g. wxSpinButton in case of a notebook in wxUniv) wxWindow *source = wxStaticCast(event.GetEventObject(), wxWindow); - while ( source && source->GetParent() != this ) + while ( source && source != this && source->GetParent() != this ) { source = source->GetParent(); }