Commit 9ac7f205 authored by Alexandre Julliard's avatar Alexandre Julliard

user32/tests: Skip tests instead of crashing if global hook cannot be set.

parent 57786d84
......@@ -7239,7 +7239,12 @@ static void test_winevents(void)
/****** start of global hook test *************/
hCBT_global_hook = SetWindowsHookExA(WH_CBT, cbt_global_hook_proc, GetModuleHandleA(0), 0);
assert(hCBT_global_hook);
if (!hCBT_global_hook)
{
ok(DestroyWindow(hwnd), "failed to destroy window\n");
skip( "cannot set global hook\n" );
return;
}
hevent = CreateEventA(NULL, 0, 0, NULL);
assert(hevent);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment