mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
Irssi crashed if script died in a signal handler.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1730 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
8a7fa0f047
commit
2aaed8dc0b
@ -163,7 +163,8 @@ static void perl_call_signal(const char *func, int signal_id,
|
||||
signal_emit("script error", 2,
|
||||
perl_script_find_package(package),
|
||||
SvPV(ERRSV, n_a));
|
||||
g_free(package);
|
||||
g_free(package);
|
||||
rec = NULL;
|
||||
}
|
||||
|
||||
/* restore arguments the perl script modified */
|
||||
@ -210,15 +211,16 @@ static void perl_call_signal(const char *func, int signal_id,
|
||||
|
||||
static void sig_func(int priority, gconstpointer *args)
|
||||
{
|
||||
GSList **list, *tmp;
|
||||
GSList **list, *tmp, *next;
|
||||
int signal_id;
|
||||
|
||||
signal_id = signal_get_emitted_id();
|
||||
list = g_hash_table_lookup(signals[priority],
|
||||
GINT_TO_POINTER(signal_id));
|
||||
for (tmp = list == NULL ? NULL : *list; tmp != NULL; tmp = tmp->next) {
|
||||
for (tmp = list == NULL ? NULL : *list; tmp != NULL; tmp = next) {
|
||||
PERL_SIGNAL_REC *rec = tmp->data;
|
||||
|
||||
next = tmp->next;
|
||||
perl_call_signal(rec->func, signal_id, args);
|
||||
if (signal_is_stopped(signal_id))
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user