diff options
author | Ted Gould <ted@canonical.com> | 2009-10-08 20:22:59 -0400 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-10-08 20:22:59 -0400 |
commit | fda24e437ad0664e7287237e5bcffcbe15faade4 (patch) | |
tree | 462424dfb896d14646f51bb22a28b6d3f7bd53bd /libindicator | |
parent | 32fc4b833fd948270eaa16f33d5b80eafef6f281 (diff) | |
download | libayatana-indicator-fda24e437ad0664e7287237e5bcffcbe15faade4.tar.gz libayatana-indicator-fda24e437ad0664e7287237e5bcffcbe15faade4.tar.bz2 libayatana-indicator-fda24e437ad0664e7287237e5bcffcbe15faade4.zip |
Maintaining a reference to the objects we create in the object.
Diffstat (limited to 'libindicator')
-rw-r--r-- | libindicator/indicator-object.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c index 6a638ec..71e72d8 100644 --- a/libindicator/indicator-object.c +++ b/libindicator/indicator-object.c @@ -126,6 +126,9 @@ indicator_object_new_from_file (const gchar * file) goto unrefandout; } priv->label = lget_label(); + if (priv->label) { + g_object_ref(G_OBJECT(priv->label)); + } /* The function for grabbing an icon from the module execute it, and make sure everything is a-okay */ @@ -139,6 +142,9 @@ indicator_object_new_from_file (const gchar * file) goto unrefandout; } priv->icon = lget_icon(); + if (priv->icon) { + g_object_ref(G_OBJECT(priv->icon)); + } /* The function for grabbing a menu from the module execute it, and make sure everything is a-okay */ @@ -152,6 +158,9 @@ indicator_object_new_from_file (const gchar * file) goto unrefandout; } priv->menu = lget_menu(); + if (priv->menu) { + g_object_ref(G_OBJECT(priv->menu)); + } if (priv->label == NULL && priv->icon == NULL) { /* This is the case where there is nothing to display, |