user32/tests: Skip tests instead of crashing if global hook cannot be set.
This commit is contained in:
parent
57786d84a1
commit
9ac7f20514
dlls/user32/tests
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue