Open irssibot opened 12 years ago
Arch Linux x86_64
Replicate with this script:
use Irssi;
sub cmd { my ($data, $server, $witem) = @_; Irssi::Windowitem::print($witem, "text"); }
Irssi::command_bind("testcmd", "cmd");
If you send /testcmd from the status window (undefined $witem) Irssi crashes with a segmentation fault.
The right thing to do here, of course, is to use if !$witem {Irssi::print();} but it shouldn't be crashing like that, right?
Similar segmentation fault crash with:
sub test { my ($dest, $text, $stripped) = @_; Irssi::print($dest->{window}); }
Irssi::signal_add('print text', 'test');
Arch Linux x86_64
Replicate with this script:
use Irssi;
sub cmd { my ($data, $server, $witem) = @_; Irssi::Windowitem::print($witem, "text"); }
Irssi::command_bind("testcmd", "cmd");
If you send /testcmd from the status window (undefined $witem) Irssi crashes with a segmentation fault.
The right thing to do here, of course, is to use if !$witem {Irssi::print();} but it shouldn't be crashing like that, right?