Fix:Core:Fixed a route crash
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 28 Dec 2008 15:56:17 +0000 (15:56 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 28 Dec 2008 15:56:17 +0000 (15:56 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1861 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/route.c

index c363317..96e8ad4 100644 (file)
@@ -1527,6 +1527,8 @@ route_path_new(struct route_graph *this, struct route_path *oldpath, struct rout
        struct street_data *sd=pos->street;
        struct route_path *ret;
 
+       if (! pos->street || ! dst->street)
+               return NULL;
        if (item_is_equal(pos->street->item, dst->street->item)) { /* We probably don't have to leave this street and can use a trivial route */
                if (!(sd->flags & AF_ONEWAY) && pos->lenneg >= dst->lenneg) {
                        return route_path_new_trivial(this, pos, dst, -1);