[anjuta] symbol-db: Remove weak pointer when plugin is destroyed
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] symbol-db: Remove weak pointer when plugin is destroyed
- Date: Sat, 22 Feb 2014 21:00:13 +0000 (UTC)
commit b4140aa5be6fbc64077945faaec68e2a73adf213
Author: Sébastien Granjoux <seb sfo free fr>
Date: Mon Feb 10 23:02:55 2014 +0100
symbol-db: Remove weak pointer when plugin is destroyed
plugins/symbol-db/plugin.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/plugins/symbol-db/plugin.c b/plugins/symbol-db/plugin.c
index 3ad0979..25732c0 100644
--- a/plugins/symbol-db/plugin.c
+++ b/plugins/symbol-db/plugin.c
@@ -2460,8 +2460,18 @@ symbol_db_dispose (GObject *obj)
SymbolDBPlugin *plugin = (SymbolDBPlugin*)obj;
DEBUG_PRINT ("Symbol-DB dispose");
/* Disposition codes */
- g_object_unref (plugin->settings);
+ if (plugin->settings != NULL)
+ {
+ g_object_unref (plugin->settings);
+ plugin->settings = NULL;
+ }
+ if (plugin->file_model != NULL)
+ {
+ g_object_remove_weak_pointer (G_OBJECT (plugin->file_model),
+ (gpointer)&plugin->file_model);
+ plugin->file_model = NULL;
+ }
G_OBJECT_CLASS (parent_class)->dispose (obj);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]