From: Ailin Nemui Date: Fri, 29 Jan 2016 11:59:40 +0000 (-0300) Subject: aspell_complete: Fix crash when the dictionary is unset X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=996e450bee675aa20a843a23f4fd229123e2100e;p=irssi-scripts.irssi.org.git aspell_complete: Fix crash when the dictionary is unset This will be fixed on the irssi side too. --- diff --git a/scripts/aspell_complete.pl b/scripts/aspell_complete.pl index da8d08c..93b2145 100644 --- a/scripts/aspell_complete.pl +++ b/scripts/aspell_complete.pl @@ -18,7 +18,7 @@ use vars qw($VERSION %IRSSI); use Irssi; use Text::Aspell; -$VERSION = '1.00'; +$VERSION = '1.01'; %IRSSI = ( authors => 'Philipp Haegi', contact => 'phaegi\@mimir.ch', @@ -59,7 +59,7 @@ sub rotate_dict() { Irssi::signal_add_last 'complete word' => sub { my ($complist, $window, $word, $linestart, $want_space) = @_; - push(@$complist, $speller->suggest( $word )); + push(@$complist, grep { defined } $speller->suggest( $word )); # eliminate null pointers };