parent
af0aa7904a
commit
c725dd7814
|
@ -541,10 +541,13 @@ static int
|
|||
plugin_hook_run (session *sess, char *name, char *word[], char *word_eol[],
|
||||
hexchat_event_attrs *attrs, int type)
|
||||
{
|
||||
/* fix segfault https://github.com/hexchat/hexchat/issues/2265 */
|
||||
static int depth = 0;
|
||||
GSList *list, *next;
|
||||
hexchat_hook *hook;
|
||||
int ret, eat = 0;
|
||||
|
||||
depth++;
|
||||
list = hook_list;
|
||||
while (1)
|
||||
{
|
||||
|
@ -590,6 +593,9 @@ plugin_hook_run (session *sess, char *name, char *word[], char *word_eol[],
|
|||
}
|
||||
|
||||
xit:
|
||||
depth--;
|
||||
if (!depth)
|
||||
{
|
||||
/* really remove deleted hooks now */
|
||||
list = hook_list;
|
||||
while (list)
|
||||
|
@ -603,6 +609,7 @@ xit:
|
|||
}
|
||||
list = next;
|
||||
}
|
||||
}
|
||||
|
||||
return eat;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue