summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--src/gui/gui-buffer.c12
-rw-r--r--weechat/ChangeLog3
-rw-r--r--weechat/src/gui/gui-buffer.c12
4 files changed, 20 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 109c48eda..2d8ea510c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,10 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
-ChangeLog - 2006-06-22
+ChangeLog - 2006-06-24
Version 0.2.0 (under dev!):
+ * fixed crash when setting look_one_server_buffer to ON (bug #16932)
* added new functions in plugin/script API: get window info,
get buffer info, get buffer content
* added polish, russian and czech quickstart guide
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index 0439424a8..d946cdb43 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -569,7 +569,7 @@ gui_buffer_line_new (t_gui_buffer *buffer)
void
gui_buffer_merge_servers (t_gui_window *window)
{
- t_gui_buffer *ptr_buffer_server, *ptr_buffer;
+ t_gui_buffer *ptr_buffer_server, *ptr_buffer, *new_ptr_buffer;
t_irc_server *ptr_server;
/* new server buffer is the first server buffer found */
@@ -583,9 +583,9 @@ gui_buffer_merge_servers (t_gui_window *window)
/* no server buffer found */
if (!ptr_buffer_server)
return;
-
- for (ptr_buffer = gui_buffers; ptr_buffer;
- ptr_buffer = ptr_buffer->next_buffer)
+
+ ptr_buffer = gui_buffers;
+ while (ptr_buffer)
{
if ((ptr_buffer != ptr_buffer_server)
&& (BUFFER_IS_SERVER(ptr_buffer)))
@@ -613,12 +613,16 @@ gui_buffer_merge_servers (t_gui_window *window)
/* free buffer but not lines, because they're now used by
our unique server buffer */
+ new_ptr_buffer = ptr_buffer->next_buffer;
ptr_buffer->lines = NULL;
gui_buffer_free (ptr_buffer, 1);
+ ptr_buffer = new_ptr_buffer;
/* asociate server with new server buffer */
ptr_server->buffer = ptr_buffer_server;
}
+ else
+ ptr_buffer = ptr_buffer->next_buffer;
}
ptr_buffer_server->all_servers = 1;
diff --git a/weechat/ChangeLog b/weechat/ChangeLog
index 109c48eda..2d8ea510c 100644
--- a/weechat/ChangeLog
+++ b/weechat/ChangeLog
@@ -1,9 +1,10 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
-ChangeLog - 2006-06-22
+ChangeLog - 2006-06-24
Version 0.2.0 (under dev!):
+ * fixed crash when setting look_one_server_buffer to ON (bug #16932)
* added new functions in plugin/script API: get window info,
get buffer info, get buffer content
* added polish, russian and czech quickstart guide
diff --git a/weechat/src/gui/gui-buffer.c b/weechat/src/gui/gui-buffer.c
index 0439424a8..d946cdb43 100644
--- a/weechat/src/gui/gui-buffer.c
+++ b/weechat/src/gui/gui-buffer.c
@@ -569,7 +569,7 @@ gui_buffer_line_new (t_gui_buffer *buffer)
void
gui_buffer_merge_servers (t_gui_window *window)
{
- t_gui_buffer *ptr_buffer_server, *ptr_buffer;
+ t_gui_buffer *ptr_buffer_server, *ptr_buffer, *new_ptr_buffer;
t_irc_server *ptr_server;
/* new server buffer is the first server buffer found */
@@ -583,9 +583,9 @@ gui_buffer_merge_servers (t_gui_window *window)
/* no server buffer found */
if (!ptr_buffer_server)
return;
-
- for (ptr_buffer = gui_buffers; ptr_buffer;
- ptr_buffer = ptr_buffer->next_buffer)
+
+ ptr_buffer = gui_buffers;
+ while (ptr_buffer)
{
if ((ptr_buffer != ptr_buffer_server)
&& (BUFFER_IS_SERVER(ptr_buffer)))
@@ -613,12 +613,16 @@ gui_buffer_merge_servers (t_gui_window *window)
/* free buffer but not lines, because they're now used by
our unique server buffer */
+ new_ptr_buffer = ptr_buffer->next_buffer;
ptr_buffer->lines = NULL;
gui_buffer_free (ptr_buffer, 1);
+ ptr_buffer = new_ptr_buffer;
/* asociate server with new server buffer */
ptr_server->buffer = ptr_buffer_server;
}
+ else
+ ptr_buffer = ptr_buffer->next_buffer;
}
ptr_buffer_server->all_servers = 1;