diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-05-29 15:45:42 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-05-29 15:45:42 +0000 |
commit | ea06192562ea2e816bbd679ef09812c8248a5e12 (patch) | |
tree | 0b619a4e50285718eb1c1fe421ce91b3c29889c9 /navit/navit.c | |
parent | 0aa4861a7c7ecd4c2354a3491991ed0025368c95 (diff) | |
download | navit-svn-ea06192562ea2e816bbd679ef09812c8248a5e12.tar.gz |
Fix:Core:Set routing profile even if no vehicle is active
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5790 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/navit.c')
-rw-r--r-- | navit/navit.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/navit/navit.c b/navit/navit.c index 73612c84..0a5c2f39 100644 --- a/navit/navit.c +++ b/navit/navit.c @@ -3136,9 +3136,7 @@ navit_set_vehicle(struct navit *this_, struct navit_vehicle *nv) { struct attr attr; this_->vehicle=nv; - if (!nv) - return; - if (vehicle_get_attr(nv->vehicle, attr_profilename, &attr, NULL)) { + if (nv && vehicle_get_attr(nv->vehicle, attr_profilename, &attr, NULL)) { if (navit_set_vehicleprofile_name(this_, attr.u.str)) return; } |