summaryrefslogtreecommitdiff
path: root/src/gui/gui-buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui-buffer.c')
-rw-r--r--src/gui/gui-buffer.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index 9b8648f61..085371c35 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -778,19 +778,16 @@ gui_buffer_close (struct t_gui_buffer *buffer, int switch_to_another)
if (gui_previous_buffer == buffer)
gui_previous_buffer = NULL;
- if (buffer->type == GUI_BUFFER_TYPE_FORMATED)
+ /* decrease buffer number for all next buffers */
+ for (ptr_buffer = buffer->next_buffer; ptr_buffer;
+ ptr_buffer = ptr_buffer->next_buffer)
{
- /* decrease buffer number for all next buffers */
- for (ptr_buffer = buffer->next_buffer; ptr_buffer;
- ptr_buffer = ptr_buffer->next_buffer)
- {
- ptr_buffer->number--;
- }
-
- /* free all lines */
- gui_chat_line_free_all (buffer);
+ ptr_buffer->number--;
}
+ /* free all lines */
+ gui_chat_line_free_all (buffer);
+
/* free some data */
if (buffer->title)
free (buffer->title);