user32: Explicitly set last error to ERROR_SUCCESS.

Huw Davies huw at codeweavers.com
Mon Mar 27 04:18:32 CDT 2017


We have tests that show this to be the case.  This fixes failures
when using winemac.drv.  The tests only succeed when using winex11.drv
because of calls to TlsGetValue(), which itself clears last error.

Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 dlls/user32/menu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c
index 827bee734e..93b39b4809 100644
--- a/dlls/user32/menu.c
+++ b/dlls/user32/menu.c
@@ -3288,6 +3288,7 @@ static BOOL MENU_TrackMenu( HMENU hmenu, UINT wFlags, INT x, INT y,
         if( menu ) menu->bTimeToHide = FALSE;
     }
 
+    SetLastError( ERROR_SUCCESS );
     /* The return value is only used by TrackPopupMenu */
     if (!(wFlags & TPM_RETURNCMD)) return TRUE;
     if (executedMenuId == -1) executedMenuId = 0;
-- 
2.12.0




More information about the wine-patches mailing list