aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-17 14:22:15 -0600
committerTed Gould <ted@gould.cx>2010-02-17 14:22:15 -0600
commit1728c0be0db166c30a2e2b2a5373d135b404d3ed (patch)
tree2f012a73ff5a1dc25816292da4b05e997bbd032b
parentd307fee44ed8e2588c23a9461a44b0d86362e53c (diff)
downloadayatana-indicator-messages-1728c0be0db166c30a2e2b2a5373d135b404d3ed.tar.gz
ayatana-indicator-messages-1728c0be0db166c30a2e2b2a5373d135b404d3ed.tar.bz2
ayatana-indicator-messages-1728c0be0db166c30a2e2b2a5373d135b404d3ed.zip
Init and cleanup the client and root private properties.
-rw-r--r--src/app-menu-item.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/app-menu-item.c b/src/app-menu-item.c
index ece5a83..67f616a 100644
--- a/src/app-menu-item.c
+++ b/src/app-menu-item.c
@@ -112,6 +112,9 @@ app_menu_item_init (AppMenuItem *self)
priv->desktop = NULL;
priv->unreadcount = 0;
+ priv->client = NULL;
+ priv->root = NULL;
+
return;
}
@@ -122,8 +125,20 @@ app_menu_item_dispose (GObject *object)
AppMenuItem * self = APP_MENU_ITEM(object);
AppMenuItemPrivate * priv = APP_MENU_ITEM_GET_PRIVATE(self);
- g_signal_handlers_disconnect_by_func(G_OBJECT(priv->listener), count_changed, self);
- g_object_unref(priv->listener);
+ if (priv->listener != NULL) {
+ g_signal_handlers_disconnect_by_func(G_OBJECT(priv->listener), count_changed, self);
+ g_object_unref(priv->listener);
+ }
+
+ if (priv->root != NULL) {
+ g_object_unref(priv->root);
+ priv->root = NULL;
+ }
+
+ if (priv->client != NULL) {
+ g_object_unref(priv->client);
+ priv->client = NULL;
+ }
G_OBJECT_CLASS (app_menu_item_parent_class)->dispose (object);
}