summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-11-05 16:04:16 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-11-05 16:04:16 +0000
commita164b85e3a83ddb6c680c46ef0297419998077e4 (patch)
tree170ffaf171426b9a98104b980866001ca39fef09
parentb0758b6facff296443044cca832ae449c0282b63 (diff)
downloadweechat-a164b85e3a83ddb6c680c46ef0297419998077e4.zip
Fixed crash with Alt-S key
-rw-r--r--src/gui/gui-common.c2
-rw-r--r--weechat/src/gui/gui-common.c2
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))
{