From a164b85e3a83ddb6c680c46ef0297419998077e4 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 5 Nov 2005 16:04:16 +0000 Subject: Fixed crash with Alt-S key --- src/gui/gui-common.c | 2 +- weechat/src/gui/gui-common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/gui-common.c b/src/gui/gui-common.c index a471fe54d..81d149499 100644 --- a/src/gui/gui-common.c +++ b/src/gui/gui-common.c @@ -1139,7 +1139,7 @@ gui_window_switch_server (t_gui_window *window) if (ptr_buffer) { - ptr_server = (SERVER(ptr_buffer)) ? + ptr_server = (SERVER(ptr_buffer) && SERVER(ptr_buffer)->next_server) ? SERVER(ptr_buffer)->next_server : irc_servers; while (ptr_server != SERVER(window->buffer)) { diff --git a/weechat/src/gui/gui-common.c b/weechat/src/gui/gui-common.c index a471fe54d..81d149499 100644 --- a/weechat/src/gui/gui-common.c +++ b/weechat/src/gui/gui-common.c @@ -1139,7 +1139,7 @@ gui_window_switch_server (t_gui_window *window) if (ptr_buffer) { - ptr_server = (SERVER(ptr_buffer)) ? + ptr_server = (SERVER(ptr_buffer) && SERVER(ptr_buffer)->next_server) ? SERVER(ptr_buffer)->next_server : irc_servers; while (ptr_server != SERVER(window->buffer)) { -- cgit v1.2.3