summaryrefslogtreecommitdiff
path: root/navit/route.c
diff options
context:
space:
mode:
Diffstat (limited to 'navit/route.c')
-rw-r--r--navit/route.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/navit/route.c b/navit/route.c
index df8016bc..3b9d8c43 100644
--- a/navit/route.c
+++ b/navit/route.c
@@ -412,7 +412,12 @@ route_pos_contains(struct route *this, struct item *item)
int
route_destination_reached(struct route *this)
{
- struct street_data *sd = this->pos->street;
+ struct street_data *sd = NULL;
+
+ if(! this->pos)
+ return 0;
+
+ sd = this->pos->street;
if (!this->path2) {
return 0;
@@ -664,6 +669,7 @@ route_set_destination(struct route *this, struct pcoord *dst)
this->dst=NULL;
if (dst) {
this->dst=route_find_nearest_street(this->ms, dst);
+ if(this->dst)
route_info_distances(this->dst, dst->pro);
}
profile(1,"find_nearest_street");