Work around to make system-global hooks at least run in the thread

that set them.
This commit is contained in:
Alexandre Julliard 2002-10-31 22:07:29 +00:00
parent cf2e57d0c7
commit 775fcfdee5

View file

@ -227,7 +227,8 @@ DECL_HANDLER(set_hook)
set_error( STATUS_INVALID_PARAMETER );
return;
}
if (!(thread = get_thread_from_id( req->tid ))) return;
if (!req->tid) thread = (struct thread *)grab_object( current );
else if (!(thread = get_thread_from_id( req->tid ))) return;
if ((hook = add_hook( thread, req->id - WH_MINHOOK )))
{