diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index 9b69452533..0476ed31dc 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -1342,7 +1342,8 @@ void wxScrollHelper::HandleOnChildFocus(wxChildFocusEvent& event) while ( win->GetParent() != m_targetWindow ) { win = win->GetParent(); - wxCHECK_RET( win, "incorrectly sent wxChildFocusEvent - not our child" ); + if ( !win ) + return; // event is not from a child of the target window } // if the child is not fully visible, try to scroll it into view: