From 3aeb24cf1dcfead638b14a8c855128ee7f7f45c2 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Tue, 7 Apr 2009 18:12:46 +0200 Subject: [PATCH] Fix crash with IRC server switch (alt-s) when no server buffer is opened --- src/plugins/irc/irc-command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index f39ce07e1..76f0b552c 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -3148,7 +3148,8 @@ irc_command_server (void *data, struct t_gui_buffer *buffer, int argc, } } } - irc_server_set_current_server (irc_current_server); + if (irc_current_server) + irc_server_set_current_server (irc_current_server); } return WEECHAT_RC_OK; }