]> git.0d.be Git - empathy.git/commitdiff
update_geocode: don't try to get position if location is empty
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 7 Sep 2011 10:05:52 +0000 (12:05 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 7 Sep 2011 10:09:47 +0000 (12:09 +0200)
geocode-glib won't be able to much if contact's location dict is empty.

libempathy/empathy-contact.c

index c6225c191894f23de7a1096c4ad900be33d309ce..f27de0414a284ebeceea4ec7da83093c1151e767 100644 (file)
@@ -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 */