From 775fcfdee584ea1eb417346d8bc4fa30c8922da9 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 31 Oct 2002 22:07:29 +0000 Subject: [PATCH] Work around to make system-global hooks at least run in the thread that set them. --- server/hook.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/hook.c b/server/hook.c index aa1e493ab26..cf81fa429b8 100644 --- a/server/hook.c +++ b/server/hook.c @@ -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 ))) { -- 2.11.4.GIT