[anjuta] quick-open: Remove weak pointer on deactivation



commit f9265673a5c20794463d7e11e973bd249055c494
Author: Sébastien Granjoux <seb sfo free fr>
Date:   Mon Feb 10 22:34:38 2014 +0100

    quick-open: Remove weak pointer on deactivation

 plugins/quick-open/plugin.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/quick-open/plugin.c b/plugins/quick-open/plugin.c
index 73bc347..5dfe0aa 100755
--- a/plugins/quick-open/plugin.c
+++ b/plugins/quick-open/plugin.c
@@ -281,12 +281,18 @@ quick_open_plugin_deactivate(AnjutaPlugin *plugin)
 
     /* Disconnect signals. */
     if (self->project_manager)
+    {
         g_signal_handlers_disconnect_by_func(self->project_manager, on_project_loaded, self);
+        g_object_remove_weak_pointer(G_OBJECT(self->project_manager), (void**)&self->project_manager);
+        self->project_manager = NULL;
+    }
 
     if (self->docman)
     {
         g_signal_handlers_disconnect_by_func(self->docman, on_document_added, self);
         g_signal_handlers_disconnect_by_func(self->docman, on_document_removed, self);
+        g_object_remove_weak_pointer(G_OBJECT(self->docman), (void**)&self->docman);
+        self->docman = NULL;
     }
 
     gtk_widget_destroy(GTK_WIDGET(self->dialog));


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