aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-26 22:55:57 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-30 19:35:23 +0800
commit14819097275f60f97d9960dee3f031a11223ca47 (patch)
treec2da2cd888892259290ec7f84312836fd3420c38
parent7dc3996067e1b97aaf49a478dcb7a72265fecba3 (diff)
downloadgsoc2013-empathy-14819097275f60f97d9960dee3f031a11223ca47.tar
gsoc2013-empathy-14819097275f60f97d9960dee3f031a11223ca47.tar.gz
gsoc2013-empathy-14819097275f60f97d9960dee3f031a11223ca47.tar.bz2
gsoc2013-empathy-14819097275f60f97d9960dee3f031a11223ca47.tar.lz
gsoc2013-empathy-14819097275f60f97d9960dee3f031a11223ca47.tar.xz
gsoc2013-empathy-14819097275f60f97d9960dee3f031a11223ca47.tar.zst
gsoc2013-empathy-14819097275f60f97d9960dee3f031a11223ca47.zip
map_view_update_contact_position: create marker if needed
-rw-r--r--src/empathy-map-view.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/empathy-map-view.c b/src/empathy-map-view.c
index cf89e2a29..2481accd6 100644
--- a/src/empathy-map-view.c
+++ b/src/empathy-map-view.c
@@ -87,6 +87,9 @@ contact_has_location (EmpathyContact *contact)
return TRUE;
}
+static ChamplainMarker * create_marker (EmpathyMapView *window,
+ EmpathyContact *contact);
+
static void
map_view_update_contact_position (EmpathyMapView *self,
EmpathyContact *contact)
@@ -97,7 +100,13 @@ map_view_update_contact_position (EmpathyMapView *self,
ChamplainMarker *marker;
marker = g_hash_table_lookup (self->markers, contact);
- g_assert (marker != NULL);
+ if (marker == NULL)
+ {
+ if (!contact_has_location (contact))
+ return;
+
+ marker = create_marker (self, contact);
+ }
location = empathy_contact_get_location (contact);