Fix:Core:Fixing a segfault with "stop navigation"
authortinloaf <tinloaf@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 14 Oct 2008 23:26:15 +0000 (23:26 +0000)
committertinloaf <tinloaf@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 14 Oct 2008 23:26:15 +0000 (23:26 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1471 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/route.c

index 72f123e..f668476 100644 (file)
@@ -615,9 +615,10 @@ route_set_destination(struct route *this, struct pcoord *dst)
        if (this->dst)
                route_info_free(this->dst);
        this->dst=NULL;
-       if (dst)
+       if (dst) {
                this->dst=route_find_nearest_street(this->ms, dst);
-       route_info_distances(this->dst, dst->pro);
+               route_info_distances(this->dst, dst->pro);
+       }
        profile(1,"find_nearest_street");
 
        /* The graph has to be destroyed and set to NULL, otherwise route_path_update() doesn't work */