diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-02-01 22:50:03 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-02-01 22:50:03 +0100 |
commit | d7cc27f713e02c2047f5d6085ec8e5d48b802522 (patch) | |
tree | 9fbbf3a7c351dd8968114e5e92db23996a5dd69c /src | |
parent | 184700e597f7374146ba0c0ca6932f83d8d6add2 (diff) | |
download | weechat-d7cc27f713e02c2047f5d6085ec8e5d48b802522.zip |
Fixed bugs/crashs when closing buffers
Diffstat (limited to 'src')
-rw-r--r-- | src/core/wee-command.c | 2 | ||||
-rw-r--r-- | src/gui/gui-buffer.c | 4 | ||||
-rw-r--r-- | src/plugins/irc/irc-buffer.c | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 1f8bbe1a1..febc05c52 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -168,7 +168,7 @@ command_buffer (void *data, struct t_gui_buffer *buffer, } gui_buffer_close (buffer, 1); gui_status_refresh_needed = 1; - buffer->input_refresh_needed = 1; + gui_current_window->buffer->input_refresh_needed = 1; } else if (string_strcasecmp (argv[1], "notify") == 0) { diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index a5a4bbdc6..72add97f4 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -665,6 +665,10 @@ gui_buffer_close (struct t_gui_buffer *buffer, int switch_to_another) gui_buffer_raw_data = NULL; } + /* free title */ + if (buffer->title) + free (buffer->title); + if (buffer->type == GUI_BUFFER_TYPE_FORMATED) { /* decrease buffer number for all next buffers */ diff --git a/src/plugins/irc/irc-buffer.c b/src/plugins/irc/irc-buffer.c index 641d19a5a..a2e7e7f68 100644 --- a/src/plugins/irc/irc-buffer.c +++ b/src/plugins/irc/irc-buffer.c @@ -176,7 +176,8 @@ irc_buffer_close_cb (void *data, struct t_gui_buffer *buffer) if (ptr_channel) { /* send PART for channel if its buffer is closed */ - if (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL) + if ((ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL) + && (ptr_channel->nicks)) { irc_command_part_channel (ptr_server, ptr_channel->name, NULL); irc_channel_free (ptr_server, ptr_channel); |