From 9de26f99dbc5ef27630e7f3e47fdc4553c2c9d45 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 28 Dec 2007 17:57:55 +0000 Subject: [PATCH] It is possible for a scrolled window to get focus events from children other than the target window's children (the wxGrid label windows for example) so don't trigger an assert about it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@50935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/scrlwing.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index 00289a0bed..5a202d2fc8 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -1359,7 +1359,8 @@ void wxScrollHelper::HandleOnChildFocus(wxChildFocusEvent& event) while ( win->GetParent() != m_targetWindow ) { win = win->GetParent(); - wxCHECK_RET( win, wxT("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: