mirror of
https://github.com/irssi/irssi.git
synced 2026-08-22 18:12:12 +02:00
Send 'setup changed' event after we echo the new setting
If the setting was created by a Perl script, and an error occurs while processing the 'setup changed' signal, the Perl script will unload and destroy the SETTINGS_REC out from under us, causing a use-after-free and likely a segfault. This commit reorders the calls so that the 'setup changed' signal happens last. As an added bonus, any output generated by any module or script in response to the new setting will show up *after* we confirm the setting change, rather than before.
This commit is contained in:
parent
c68d017f4e
commit
bbf52fa7fa
1 changed files with 1 additions and 1 deletions
|
|
@ -191,9 +191,9 @@ static void cmd_set(char *data)
|
|||
/* Unpossible! */
|
||||
break;
|
||||
}
|
||||
signal_emit("setup changed", 0);
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_SET_TITLE, rec->section);
|
||||
set_print(rec);
|
||||
signal_emit("setup changed", 0);
|
||||
} else
|
||||
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR, TXT_SET_UNKNOWN, key);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue