diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2003-10-01 21:50:50 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2003-10-01 21:50:50 +0000 |
commit | d0bb1e0c2ae2bd1ffa61b65fb7b0c9d6cd17cb12 (patch) | |
tree | dcbafe59808162609304b1f67a8e9b22183d2170 /src/irc | |
parent | 77e0d01d7a1d57b612a637b1fc8046a3c0537538 (diff) | |
download | weechat-d0bb1e0c2ae2bd1ffa61b65fb7b0c9d6cd17cb12.zip |
Fixed bug when destroying last server
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/irc-server.c | 18 | ||||
-rw-r--r-- | src/irc/irc.h | 1 |
2 files changed, 2 insertions, 17 deletions
diff --git a/src/irc/irc-server.c b/src/irc/irc-server.c index daa059ca3..4f82fd747 100644 --- a/src/irc/irc-server.c +++ b/src/irc/irc-server.c @@ -114,22 +114,6 @@ server_alloc () } /* - * server_create_window: create windows for a server - */ - -void -server_create_window (t_irc_server *server) -{ - if (!SERVER(gui_windows)) - { - server->window = gui_windows; - SERVER(gui_windows) = server; - } - else - gui_window_new (server, NULL); -} - -/* * server_destroy: free server data (not struct himself) */ @@ -181,6 +165,8 @@ server_free (t_irc_server *server) (server->next_server)->prev_server = server->prev_server; server_destroy (server); + if (server->window) + gui_window_free (server->window); free (server); irc_servers = new_irc_servers; } diff --git a/src/irc/irc.h b/src/irc/irc.h index 389a9f70f..8dcd30639 100644 --- a/src/irc/irc.h +++ b/src/irc/irc.h @@ -140,7 +140,6 @@ extern t_irc_channel *current_channel; extern void server_init (t_irc_server *); extern t_irc_server *server_alloc (); -extern void server_create_window (t_irc_server *); extern void server_destroy (t_irc_server *); extern void server_free (t_irc_server *); extern void server_free_all (); |