1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-27 05:20:20 -04:00

Unloading perl script crashed if it has used Irssi::timeout_add().

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@620 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-08-22 22:11:37 +00:00 committed by cras
parent 08c6484b6b
commit 48cb846230

View File

@ -199,7 +199,7 @@ static int signal_destroy_hash(void *key, GSList **list, const char *package)
static int perl_script_destroy(const char *name)
{
GSList *tmp;
GSList *tmp, *next;
char *package;
int package_len;
@ -214,9 +214,10 @@ static int perl_script_destroy(const char *name)
g_hash_table_foreach_remove(last_signals,
(GHRFunc) signal_destroy_hash, package);
for (tmp = perl_timeouts; tmp != NULL; tmp = tmp->next) {
for (tmp = perl_timeouts; tmp != NULL; tmp = next) {
PERL_TIMEOUT_REC *rec = tmp->data;
next = tmp->next;
if (strncmp(rec->func, package, package_len) == 0)
perl_timeout_destroy(rec);
}