[empathy] update_geocode: don't try to get position if location is empty



commit a9eb911ea875ce7e9a1c43fe76ddc77811887a60
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Sep 7 12:05:52 2011 +0200

    update_geocode: don't try to get position if location is empty
    
    geocode-glib won't be able to much if contact's location dict is empty.

 libempathy/empathy-contact.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index c6225c1..f27de04 100644
--- a/libempathy/empathy-contact.c
+++ b/libempathy/empathy-contact.c
@@ -1663,7 +1663,8 @@ update_geocode (EmpathyContact *contact)
   GHashTable *location;
 
   location = empathy_contact_get_location (contact);
-  if (location == NULL)
+  if (location == NULL ||
+      g_hash_table_size (location) == 0)
     return;
 
   /* No need to search for position if contact published it */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]