[PATCH 2/2] Don't crash on Win9x/WinMe

Paul Vriens Paul.Vriens.Wine at gmail.com
Thu Jan 21 04:59:31 CST 2010


---
 dlls/user32/tests/win.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 7bf498e..6fb6ce0 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -2785,14 +2785,21 @@ static void test_capture_4(void)
     hmenu = CreatePopupMenu();
 
     ret = AppendMenuA( hmenu, MF_STRING, 1, "winetest2");
-    ok( ret, "AppendMenA has failed!\n");
+    ok( ret, "AppendMenuA has failed!\n");
 
     /* set main window to have initial capture */
     SetCapture(hwnd);
 
-    /* create popup (it will self-destruct) */
-    ret = TrackPopupMenu(hmenu, 0x100, 100,100, 0, hwnd, NULL);
-    ok( ret == 0, "TrackPopupMenu returned %d expected zero\n", ret);
+    if (!GetWindowLongW(GetDesktopWindow(), GWL_STYLE))
+    {
+        win_skip("TrackPopupMenu test crashes on Win9x/WinMe\n");
+    }
+    else
+    {
+        /* create popup (it will self-destruct) */
+        ret = TrackPopupMenu(hmenu, TPM_RETURNCMD, 100, 100, 0, hwnd, NULL);
+        ok( ret == 0, "TrackPopupMenu returned %d expected zero\n", ret);
+    }
 
     /* clean up */
     DestroyMenu(hmenu);
-- 
1.6.2.5


--------------040002030002080902020800--



More information about the wine-patches mailing list