1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

Fix wrong way on unloaded checks

This commit is contained in:
aquanight 2020-07-05 15:46:34 -06:00
parent 6012ec9e56
commit 7daeaa25b6
2 changed files with 3 additions and 3 deletions

View File

@ -440,7 +440,7 @@ static void perl_signal_add_full_int(const char *signal, SV *func,
script = perl_script_find_package(perl_get_package());
g_return_if_fail(script != NULL);
g_return_if_fail(script->unloaded);
g_return_if_fail(!script->unloaded);
rec = g_new(PERL_SIGNAL_REC, 1);
rec->script = script;

View File

@ -107,7 +107,7 @@ int perl_timeout_add(int msecs, SV *func, SV *data, int once)
pkg = perl_get_package();
script = perl_script_find_package(pkg);
g_return_val_if_fail(script != NULL, -1);
g_return_val_if_fail(script->unloaded, -1);
g_return_val_if_fail(!script->unloaded, -1);
rec = g_new0(PERL_SOURCE_REC, 1);
perl_source_ref(rec);
@ -131,7 +131,7 @@ int perl_input_add(int source, int condition, SV *func, SV *data, int once)
pkg = perl_get_package();
script = perl_script_find_package(pkg);
g_return_val_if_fail(script != NULL, -1);
g_return_val_if_fail(script->unloaded, -1);
g_return_val_if_fail(!script->unloaded, -1);
rec = g_new0(PERL_SOURCE_REC, 1);
perl_source_ref(rec);