1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00

Irssi crashed if loading script failed.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1713 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-08-07 21:03:26 +00:00 committed by cras
parent b80d4e62ab
commit be601764ae

View File

@ -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;
}