Fix:core:don't crash if attempted to set destination without vehicleprofile selected.
authormdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 10 Jun 2012 20:45:38 +0000 (20:45 +0000)
committermdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 10 Jun 2012 20:45:38 +0000 (20:45 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@5140 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/route.c

index 6a4ac6f..4a9f3c9 100644 (file)
@@ -2836,6 +2836,9 @@ route_find_nearest_street(struct vehicleprofile *vehicleprofile, struct mapset *
        struct street_data *sd;
        struct coord c;
        struct coord_geo g;
+       
+       if(!vehicleprofile)
+               return NULL;
 
        ret=g_new0(struct route_info, 1);
        mindist = INT_MAX;