diff options
author | Ted Gould <ted@gould.cx> | 2010-02-17 14:22:15 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-02-17 14:22:15 -0600 |
commit | 1728c0be0db166c30a2e2b2a5373d135b404d3ed (patch) | |
tree | 2f012a73ff5a1dc25816292da4b05e997bbd032b | |
parent | d307fee44ed8e2588c23a9461a44b0d86362e53c (diff) | |
download | ayatana-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.c | 19 |
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); } |