aboutsummaryrefslogtreecommitdiffstats
path: root/vim-mode/vim_mode.pl
diff options
context:
space:
mode:
Diffstat (limited to 'vim-mode/vim_mode.pl')
-rw-r--r--vim-mode/vim_mode.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/vim-mode/vim_mode.pl b/vim-mode/vim_mode.pl
index 3ed29ae..94d8967 100644
--- a/vim-mode/vim_mode.pl
+++ b/vim-mode/vim_mode.pl
@@ -1796,6 +1796,9 @@ sub ex_server_next {
my @server_ids = map { $_->{tag} . "\x1d" . $_->{nick} } Irssi::servers;
my $server = Irssi::active_server;
+
+ return unless $server;
+
my $current_id = $server->{tag} . "\x1d" . $server->{nick};
my $next = 0;
my $server_count = scalar @server_ids;
@@ -1820,6 +1823,9 @@ sub ex_server_prev {
my @server_ids = map { $_->{tag} . "\x1d" . $_->{nick} } Irssi::servers;
my $server = Irssi::active_server;
+
+ return unless $server;
+
my $current_id = $server->{tag} . "\x1d" . $server->{nick};
my $prev = 0;
my $server_count = scalar @server_ids;