diff options
author | Sebastien Bacher <seb128@ubuntu.com> | 2012-03-08 21:57:54 +0100 |
---|---|---|
committer | Sebastien Bacher <seb128@ubuntu.com> | 2012-03-08 21:57:54 +0100 |
commit | 9a23466740bf7a47bf0998e830c69a245bf3b646 (patch) | |
tree | d1f50f36499f0faa50c72a896eb89de3e59a9dd9 /libindicator | |
parent | 94c7bd6424040e4b6c6dcaaf89329ef66302d125 (diff) | |
parent | bbbe42afe728d7c9b447b11f88c049eafad9df52 (diff) | |
download | libayatana-indicator-9a23466740bf7a47bf0998e830c69a245bf3b646.tar.gz libayatana-indicator-9a23466740bf7a47bf0998e830c69a245bf3b646.tar.bz2 libayatana-indicator-9a23466740bf7a47bf0998e830c69a245bf3b646.zip |
releasing version 0.4.93-0ubuntu1
Diffstat (limited to 'libindicator')
-rw-r--r-- | libindicator/indicator-object.c | 11 | ||||
-rw-r--r-- | libindicator/indicator-service.c | 4 |
2 files changed, 6 insertions, 9 deletions
diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c index 17a6d1d..ca821af 100644 --- a/libindicator/indicator-object.c +++ b/libindicator/indicator-object.c @@ -464,21 +464,16 @@ indicator_object_new_from_file (const gchar * file) goto unrefandout; } - IndicatorObjectPrivate * priv = INDICATOR_OBJECT_GET_PRIVATE(object); /* Now we can track the module */ - priv->module = module; + INDICATOR_OBJECT_GET_PRIVATE(object)->module = module; return INDICATOR_OBJECT(object); /* 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; } diff --git a/libindicator/indicator-service.c b/libindicator/indicator-service.c index e9f3133..11171fc 100644 --- a/libindicator/indicator-service.c +++ b/libindicator/indicator-service.c @@ -588,7 +588,9 @@ unwatch_core (IndicatorService * service, const gchar * name) /* Remove us from the watcher list here */ gpointer watcher_item = g_hash_table_lookup(priv->watchers, name); if (watcher_item != NULL) { - g_hash_table_remove(priv->watchers, name); + gchar * safe_name = g_strdup(name); + g_hash_table_remove(priv->watchers, safe_name); + g_free(safe_name); } else { /* Odd that we couldn't find the person, but, eh */ g_warning("Unable to find watcher who is unwatching: %s", name); |