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

Huw Davies huw at codeweavers.com
Wed Jun 7 10:09:14 CDT 2017


Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 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 203492a94a..08df5bcc2f 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;
-- 
2.12.0




More information about the wine-patches mailing list