diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index 0b6c1fcc6e..7b686a1cf3 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -1359,6 +1359,10 @@ void wxScrollHelper::HandleOnChildFocus(wxChildFocusEvent& event) // find the immediate child under which the window receiving focus is: wxWindow *win = event.GetWindow(); + + if ( win == m_targetWindow ) + return; // nothing to do + while ( win->GetParent() != m_targetWindow ) { win = win->GetParent();