From a0d924c6966edb42be0a2c690ca8cc3bc139b211 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 12 Feb 2004 09:29:19 +0000 Subject: [PATCH] Infinite recursion fix Viktor Voroshylo: I did not put it in __WXWINCE__ defines as it looks like just another safeguard that will work on regular windows as well. The problem was that wxWindowMSW::MSWOnScroll is calling itself forever under winCE for wxListCtrl object. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 814064fb75..d47f77d3a1 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -4782,8 +4782,8 @@ bool wxWindowMSW::HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags) bool wxWindowMSW::MSWOnScroll(int orientation, WXWORD wParam, WXWORD pos, WXHWND control) -{ - if ( control ) +{ + if ( control && control != m_hWnd ) // Prevent infinite recursion { wxWindow *child = wxFindWinFromHandle(control); if ( child ) -- 2.45.2