aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-19 23:12:20 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-20 21:13:35 +0800
commit108817b949df863a7c17748587dbccc9b313ba16 (patch)
treeb5670f9f32518d5e34bf6915f97a217dbd843c14
parent35722b1439baba701f5ba99ea8c3b956e7dda157 (diff)
downloadgsoc2013-empathy-108817b949df863a7c17748587dbccc9b313ba16.tar
gsoc2013-empathy-108817b949df863a7c17748587dbccc9b313ba16.tar.gz
gsoc2013-empathy-108817b949df863a7c17748587dbccc9b313ba16.tar.bz2
gsoc2013-empathy-108817b949df863a7c17748587dbccc9b313ba16.tar.lz
gsoc2013-empathy-108817b949df863a7c17748587dbccc9b313ba16.tar.xz
gsoc2013-empathy-108817b949df863a7c17748587dbccc9b313ba16.tar.zst
gsoc2013-empathy-108817b949df863a7c17748587dbccc9b313ba16.zip
location_manager_dispose: use tp_clear_*
-rw-r--r--libempathy-gtk/empathy-location-manager.c41
1 files changed, 6 insertions, 35 deletions
diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c
index 1925d4371..d34cf10c6 100644
--- a/libempathy-gtk/empathy-location-manager.c
+++ b/libempathy-gtk/empathy-location-manager.c
@@ -103,41 +103,12 @@ location_manager_dispose (GObject *object)
void (*dispose) (GObject *) =
G_OBJECT_CLASS (empathy_location_manager_parent_class)->dispose;
- if (priv->account_manager != NULL)
- {
- g_object_unref (priv->account_manager);
- priv->account_manager = NULL;
- }
-
- if (priv->gsettings_loc != NULL)
- {
- g_object_unref (priv->gsettings_loc);
- priv->gsettings_loc = NULL;
- }
-
- if (priv->gc_client != NULL)
- {
- g_object_unref (priv->gc_client);
- priv->gc_client = NULL;
- }
-
- if (priv->gc_position != NULL)
- {
- g_object_unref (priv->gc_position);
- priv->gc_position = NULL;
- }
-
- if (priv->gc_address != NULL)
- {
- g_object_unref (priv->gc_address);
- priv->gc_address = NULL;
- }
-
- if (priv->location != NULL)
- {
- g_hash_table_unref (priv->location);
- priv->location = NULL;
- }
+ tp_clear_object (&priv->account_manager);
+ tp_clear_object (&priv->gsettings_loc);
+ tp_clear_object (&priv->gc_client);
+ tp_clear_object (&priv->gc_position);
+ tp_clear_object (&priv->gc_address);
+ tp_clear_pointer (&priv->location, g_hash_table_unref);
if (dispose != NULL)
dispose (object);