diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2007-12-19 18:34:37 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2007-12-19 18:34:37 +0100 |
commit | 117215942185522848982f51f5fa1f2537c4f239 (patch) | |
tree | 31fcb60bbac40946f2f09cae2f88f436c4b12c48 /src/core | |
parent | 6fd0bd2158e5eb0c182e6b7d4132c84734a256cb (diff) | |
download | weechat-117215942185522848982f51f5fa1f2537c4f239.zip |
Fixed crash when removing hook
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/wee-hook.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index e7ac17c45..db2b3dd72 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -136,6 +136,9 @@ void hook_remove_from_list (struct t_hook *hook) { struct t_hook *new_hooks; + int type; + + type = hook->type; if (last_weechat_hook[hook->type] == hook) last_weechat_hook[hook->type] = hook->prev_hook; @@ -151,7 +154,8 @@ hook_remove_from_list (struct t_hook *hook) hook->next_hook->prev_hook = hook->prev_hook; free (hook); - weechat_hooks[hook->type] = new_hooks; + + weechat_hooks[type] = new_hooks; } /* |