mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05: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:
parent
08c6484b6b
commit
48cb846230
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user