From 7b17a62e59fa25ff29cee24d7b713359cd99670a Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 21 Mar 2009 18:23:08 +0100 Subject: Fix bug when closing IRC channel buffers (pointer to current server is lost) --- src/plugins/irc/irc-buffer.c | 9 ++++----- 1 file 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; -- cgit v1.2.3