aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-map-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/empathy-map-view.c')
-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)
{