Fix:Core:Fix crash when offroad
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 26 Jun 2011 21:51:06 +0000 (21:51 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 26 Jun 2011 21:51:06 +0000 (21:51 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4539 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/track.c

index e3d8dfb..3057f36 100644 (file)
@@ -767,7 +767,7 @@ tracking_update(struct tracking *tr, struct vehicle *v, struct vehicleprofile *v
                tr->coord_geo_valid=0;
                tr->street_direction=0;
        }
-       if (tr->curr_line->street->flags & AF_UNDERGROUND) {
+       if (tr->curr_line && tr->curr_line->street->flags & AF_UNDERGROUND) {
                if (tr->no_gps) 
                        tr->tunnel=1;
        } else if (tr->tunnel) {