diff options
-rw-r--r-- | src/gui/gui-common.c | 2 | ||||
-rw-r--r-- | 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)) { |