[empathy] don't start geocode search if the address is empty
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] don't start geocode search if the address is empty
- Date: Thu, 8 Apr 2010 13:52:10 +0000 (UTC)
commit e793c8e563a0ab7f61c06852423571a21f2e3c05
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Thu Apr 8 13:34:38 2010 +0200
don't start geocode search if the address is empty
libempathy/empathy-contact.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index 707031a..f6f0e25 100644
--- a/libempathy/empathy-contact.c
+++ b/libempathy/empathy-contact.c
@@ -1364,9 +1364,13 @@ update_geocode (EmpathyContact *contact)
DEBUG ("\t - street: %s", str);
}
- g_object_ref (contact);
- geoclue_geocode_address_to_position_async (geocode, address,
- geocode_cb, contact);
+ if (g_hash_table_size (address) > 0)
+ {
+ g_object_ref (contact);
+
+ geoclue_geocode_address_to_position_async (geocode, address,
+ geocode_cb, contact);
+ }
g_hash_table_unref (address);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]