summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-03-21 18:23:08 +0100
committerSebastien Helleu <flashcode@flashtux.org>2009-03-21 18:23:08 +0100
commit7b17a62e59fa25ff29cee24d7b713359cd99670a (patch)
tree4100f9a92d3154542066ac692efb373eeac020d6
parentebc4e04333d012ae1a62e11c17ac874f74ac361a (diff)
downloadweechat-7b17a62e59fa25ff29cee24d7b713359cd99670a.zip
Fix bug when closing IRC channel buffers (pointer to current server is lost)
-rw-r--r--src/plugins/irc/irc-buffer.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/irc/irc-buffer.c b/src/plugins/irc/irc-buffer.c
index 36fc16896..2539d3b21 100644
--- a/src/plugins/irc/irc-buffer.c
+++ b/src/plugins/irc/irc-buffer.c
@@ -317,12 +317,11 @@ irc_buffer_close_cb (void *data, struct t_gui_buffer *buffer)
irc_server_disconnect (ptr_server, 0);
ptr_server->buffer = NULL;
}
+ if (irc_buffer_servers == buffer)
+ irc_buffer_servers = NULL;
+ if (ptr_server && (irc_current_server == ptr_server))
+ irc_current_server = NULL;
}
-
- if (irc_buffer_servers == buffer)
- irc_buffer_servers = NULL;
- if (ptr_server && (irc_current_server == ptr_server))
- irc_current_server = NULL;
}
return WEECHAT_RC_OK;