[anjuta] tools: Remove weak pointer when the context is destroyed



commit 7ff09d2fdf6a855415c1a17a692c3b95f6f8b364
Author: Sébastien Granjoux <seb sfo free fr>
Date:   Mon Feb 10 22:43:49 2014 +0100

    tools: Remove weak pointer when the context is destroyed

 plugins/tools/execute.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/tools/execute.c b/plugins/tools/execute.c
index 0b53c5d..a6b361f 100644
--- a/plugins/tools/execute.c
+++ b/plugins/tools/execute.c
@@ -687,8 +687,14 @@ atp_output_context_destroy (ATPOutputContext *this)
                man = anjuta_shell_get_interface (this->execution->plugin->shell,
                                                                                  IAnjutaMessageManager, 
NULL);
                ianjuta_message_manager_remove_view (man, this->view, NULL);
+               g_object_remove_weak_pointer (G_OBJECT (this->view), (gpointer *)(gpointer)&this->view);
                this->view = NULL;
        }
+       if (this->editor)
+       {
+               g_object_remove_weak_pointer (G_OBJECT (this->editor), (gpointer *)(gpointer)&this->editor);
+               this->editor = NULL;
+       }
        if (this->buffer)
        {
                g_string_free (this->buffer, TRUE);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]