summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2007-12-19 18:42:10 +0100
committerSebastien Helleu <flashcode@flashtux.org>2007-12-19 18:42:10 +0100
commit14656acc674c8bdc82925d1ccf073c6a8e88a20e (patch)
tree607040ac55286c072f1d260cf8d5a3a6668fc150 /src
parent117215942185522848982f51f5fa1f2537c4f239 (diff)
downloadweechat-14656acc674c8bdc82925d1ccf073c6a8e88a20e.zip
Fixed crash with display of status bar when exiting WeeChat
Diffstat (limited to 'src')
-rw-r--r--src/plugins/plugin.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c
index f976c4740..625e9fe2e 100644
--- a/src/plugins/plugin.c
+++ b/src/plugins/plugin.c
@@ -456,6 +456,7 @@ void
plugin_remove (struct t_weechat_plugin *plugin)
{
struct t_weechat_plugin *new_weechat_plugins;
+ struct t_gui_buffer *ptr_buffer;
/* remove plugin from list */
if (last_weechat_plugin == plugin)
@@ -476,6 +477,14 @@ plugin_remove (struct t_weechat_plugin *plugin)
/* remove all hooks */
unhook_all_plugin (plugin);
+
+ /* remove pointer to this plugin on buffers */
+ for (ptr_buffer = gui_buffers; ptr_buffer;
+ ptr_buffer = ptr_buffer->next_buffer)
+ {
+ if (ptr_buffer->plugin == plugin)
+ ptr_buffer->plugin = NULL;
+ }
/* free data */
if (plugin->filename)