1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 16:53:14 +02:00

Fixed bugs/crashs when closing buffers

This commit is contained in:
Sebastien Helleu
2008-02-01 22:50:03 +01:00
parent 184700e597
commit d7cc27f713
3 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -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)
{
+4
View File
@@ -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 */
+2 -1
View File
@@ -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);