Huw Davies : wineandroid: The event list may have been altered by a recursive call, so restart the loop from the beginning.

Alexandre Julliard julliard at winehq.org
Wed Jun 7 16:24:09 CDT 2017


Module: wine
Branch: master
Commit: eb04665281481688478206ef87b801ef394d5bc3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=eb04665281481688478206ef87b801ef394d5bc3

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Jun  7 16:09:14 2017 +0100

wineandroid: The event list may have been altered by a recursive call, so restart the loop from the beginning.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wineandroid.drv/window.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c
index 7dff297..e3fd865 100644
--- a/dlls/wineandroid.drv/window.c
+++ b/dlls/wineandroid.drv/window.c
@@ -360,6 +360,8 @@ static int process_events( DWORD mask )
         }
         HeapFree( GetProcessHeap(), 0, event );
         count++;
+        /* next may have been removed by a recursive call, so reset it to the beginning of the list */
+        next = LIST_ENTRY( event_queue.next, struct java_event, entry );
     }
     current_event = previous;
     return count;




More information about the wine-cvs mailing list