1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 09:13:14 +02:00

Fixed crash with scripts when WeeChat calls functions of many scripts at same time with callbacks (bug #23109)

This commit is contained in:
Sebastien Helleu
2008-04-30 13:21:21 +02:00
parent 760e216c5b
commit 886b81498f
13 changed files with 234 additions and 34 deletions
+7 -3
View File
@@ -562,18 +562,22 @@ void
plugin_remove (struct t_weechat_plugin *plugin)
{
struct t_weechat_plugin *new_weechat_plugins;
struct t_gui_buffer *ptr_buffer;
struct t_gui_buffer *ptr_buffer, *next_buffer;
/* close buffers created by this plugin */
for (ptr_buffer = gui_buffers; ptr_buffer;
ptr_buffer = ptr_buffer->next_buffer)
ptr_buffer = gui_buffers;
while (ptr_buffer)
{
next_buffer = ptr_buffer->next_buffer;
if (ptr_buffer->plugin == plugin)
{
ptr_buffer->close_callback = NULL;
ptr_buffer->close_callback_data = NULL;
gui_buffer_close (ptr_buffer, 1);
}
ptr_buffer = next_buffer;
}
/* remove plugin from list */