summaryrefslogtreecommitdiff
path: root/src/perl/perl-core.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-08-07 21:03:26 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-08-07 21:03:26 +0000
commitbe601764ae80a853c7bca27eb624b246ab561d4c (patch)
tree0ff9fd4a2c50be90c02d237f7520db2acfc4bc48 /src/perl/perl-core.c
parentb80d4e62ab1c8eec62c13cbb9966429914f3a9f5 (diff)
downloadirssi-be601764ae80a853c7bca27eb624b246ab561d4c.zip
Irssi crashed if loading script failed.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1713 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/perl-core.c')
-rw-r--r--src/perl/perl-core.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/perl/perl-core.c b/src/perl/perl-core.c
index b6fce2c1..0807fc72 100644
--- a/src/perl/perl-core.c
+++ b/src/perl/perl-core.c
@@ -230,10 +230,8 @@ static PERL_SCRIPT_REC *script_load(char *name, const char *path,
perl_scripts = g_slist_append(perl_scripts, script);
signal_emit("script created", 1, script);
- if (!perl_script_eval(script)) {
- perl_script_unload(script);
- script = NULL;
- }
+ if (!perl_script_eval(script))
+ script = NULL; /* the script is destroyed in "script error" signal */
return script;
}