From: Rémi Bernon rbernon@codeweavers.com
Fixes: 5b7b76432dffa453e75c6336d76fdb856ab8d0c7 --- server/hook.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/server/hook.c b/server/hook.c index 688174baab5..d04b784b0b3 100644 --- a/server/hook.c +++ b/server/hook.c @@ -285,12 +285,9 @@ static struct hook *get_next_hook( struct thread *thread, struct hook *hook, int } } } - global_hooks = get_global_hooks( thread ); - if (global_hooks && table != global_hooks) /* now search through the global table */ - { - hook = get_first_valid_hook( global_hooks, index, event, win, object_id, child_id ); - } - return hook; + + if (!(global_hooks = get_global_hooks( thread )) || table == global_hooks) return NULL; + return get_first_valid_hook( global_hooks, index, event, win, object_id, child_id ); }
static void hook_table_dump( struct object *obj, int verbose )