diff options
author | LemonBoy <thatlemon@gmail.com> | 2016-09-13 17:11:05 +0200 |
---|---|---|
committer | LemonBoy <thatlemon@gmail.com> | 2016-09-13 17:11:05 +0200 |
commit | 21539019dd46ec88a3369b53cc0069b372c6d7d1 (patch) | |
tree | 70baff49e50b54cbd6ab3ed0d051480fae901b0c /src/perl/textui | |
parent | d2c5939de0e875806d07cce4753ccc1a10ac6252 (diff) | |
download | irssi-21539019dd46ec88a3369b53cc0069b372c6d7d1.zip |
Make sure to make a copy of ERRSV content.
Otherwise we might end up showing an empty message.
Fixes #522.
Diffstat (limited to 'src/perl/textui')
-rw-r--r-- | src/perl/textui/Statusbar.xs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/perl/textui/Statusbar.xs b/src/perl/textui/Statusbar.xs index a449e11d..8b0e5f65 100644 --- a/src/perl/textui/Statusbar.xs +++ b/src/perl/textui/Statusbar.xs @@ -77,7 +77,10 @@ static void perl_statusbar_event(char *function, SBAR_ITEM_REC *item, /* make sure we don't get back here */ script_unregister_statusbars(script); } - signal_emit("script error", 2, script, SvPV_nolen(ERRSV)); + + char *error = g_strdup(SvPV_nolen(ERRSV)); + signal_emit("script error", 2, script, error); + g_free(error); } else { /* min_size and max_size can be changed, move them to SBAR_ITEM_REC */ hv = hvref(item_sv); |