aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-26 22:59:53 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-30 19:35:23 +0800
commit7e082683ab606d1521fbbaa7dffd75efe7395e20 (patch)
treecc2523a22e1d9cb887d2ae1f6f95226806622178 /src
parentb3967cf0f91e74052af81df1b6a7a93b02be3df4 (diff)
downloadgsoc2013-empathy-7e082683ab606d1521fbbaa7dffd75efe7395e20.tar
gsoc2013-empathy-7e082683ab606d1521fbbaa7dffd75efe7395e20.tar.gz
gsoc2013-empathy-7e082683ab606d1521fbbaa7dffd75efe7395e20.tar.bz2
gsoc2013-empathy-7e082683ab606d1521fbbaa7dffd75efe7395e20.tar.lz
gsoc2013-empathy-7e082683ab606d1521fbbaa7dffd75efe7395e20.tar.xz
gsoc2013-empathy-7e082683ab606d1521fbbaa7dffd75efe7395e20.tar.zst
gsoc2013-empathy-7e082683ab606d1521fbbaa7dffd75efe7395e20.zip
map_view_update_contact_position: don't call contact_has_location twice
Diffstat (limited to 'src')
-rw-r--r--src/empathy-map-view.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/empathy-map-view.c b/src/empathy-map-view.c
index b14a57273..e5240cb9c 100644
--- a/src/empathy-map-view.c
+++ b/src/empathy-map-view.c
@@ -98,24 +98,26 @@ map_view_update_contact_position (EmpathyMapView *self,
GValue *value;
GHashTable *location;
ChamplainMarker *marker;
+ gboolean has_location;
+
+ has_location = contact_has_location (contact);
marker = g_hash_table_lookup (self->markers, contact);
if (marker == NULL)
{
- if (!contact_has_location (contact))
+ if (!has_location)
return;
marker = create_marker (self, contact);
}
-
- location = empathy_contact_get_location (contact);
-
- if (!contact_has_location (contact))
+ else if (!has_location)
{
champlain_base_marker_animate_out (CHAMPLAIN_BASE_MARKER (marker));
return;
}
+ location = empathy_contact_get_location (contact);
+
value = g_hash_table_lookup (location, EMPATHY_LOCATION_LAT);
if (value == NULL)
{