Commit 775fcfde authored by Alexandre Julliard's avatar Alexandre Julliard

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

that set them.
parent cf2e57d0
...@@ -227,7 +227,8 @@ DECL_HANDLER(set_hook) ...@@ -227,7 +227,8 @@ DECL_HANDLER(set_hook)
set_error( STATUS_INVALID_PARAMETER ); set_error( STATUS_INVALID_PARAMETER );
return; 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 ))) if ((hook = add_hook( thread, req->id - WH_MINHOOK )))
{ {
......
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