diff options
Diffstat (limited to 'src/empathy-map-view.c')
-rw-r--r-- | src/empathy-map-view.c | 11 |
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); |