aboutsummaryrefslogtreecommitdiff
path: root/libindicator
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-02-29 14:55:23 -0600
committerCharles Kerr <charles.kerr@canonical.com>2012-02-29 14:55:23 -0600
commitb6454804274860b4716ed6eae826a340e87408d0 (patch)
tree0f16144ce431a664cecdb61996d9ee83ddaa6009 /libindicator
parent69f15f71084d413e8063e577689be9ca8a3aedc6 (diff)
downloadlibayatana-indicator-b6454804274860b4716ed6eae826a340e87408d0.tar.gz
libayatana-indicator-b6454804274860b4716ed6eae826a340e87408d0.tar.bz2
libayatana-indicator-b6454804274860b4716ed6eae826a340e87408d0.zip
tweak: use g_clear_object() instead of if-not-null-g_object_unref()
Diffstat (limited to 'libindicator')
-rw-r--r--libindicator/indicator-object.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c
index 17a6d1d..0674913 100644
--- a/libindicator/indicator-object.c
+++ b/libindicator/indicator-object.c
@@ -473,12 +473,8 @@ indicator_object_new_from_file (const gchar * file)
/* Error, let's drop the object and return NULL. Sad when
this happens. */
unrefandout:
- if (object != NULL) {
- g_object_unref(object);
- }
- if (module != NULL) {
- g_object_unref(module);
- }
+ g_clear_object (&object);
+ g_clear_object (&module);
g_warning("Error building IndicatorObject from file: %s", file);
return NULL;
}