diff --git a/src/common/bookctrl.cpp b/src/common/bookctrl.cpp index 2ee818f20c..16e4cf3e9a 100644 --- a/src/common/bookctrl.cpp +++ b/src/common/bookctrl.cpp @@ -164,6 +164,15 @@ wxSize wxBookCtrlBase::DoGetBestSize() const #if wxUSE_HELP void wxBookCtrlBase::OnHelp(wxHelpEvent& event) { + // ignore the events not coming from the book control itself, otherwise we + // could attempt to redirect a help event generated by one of our pages + // back to the same page resulting in an infinite loop + if ( event.GetEventObject() != this ) + { + event.Skip(); + return; + } + // find the corresponding page wxWindow *page = NULL;