From d9144cfca459ac65851cce05dc7c94727b5f8395 Mon Sep 17 00:00:00 2001 From: martin-s Date: Sun, 4 May 2008 16:52:42 +0000 Subject: [PATCH] Fix:Core:Fixed vehicle switching git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1040 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/src/navit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/navit/src/navit.c b/navit/src/navit.c index 3bb9527..f3efa04 100644 --- a/navit/src/navit.c +++ b/navit/src/navit.c @@ -1193,12 +1193,12 @@ navit_set_attr(struct navit *this_, struct attr *attr) } break; case attr_vehicle: - if (this_->vehicle && this_->vehicle->vehicle != attr->u.vehicle) { + if (!this_->vehicle || this_->vehicle->vehicle != attr->u.vehicle) { GList *l; l=this_->vehicles; while(l) { if (((struct navit_vehicle *)l->data)->vehicle == attr->u.vehicle) { - this_->vehicle=(struct navit_vehicle *)l; + this_->vehicle=(struct navit_vehicle *)l->data; attr_updated=1; } l=g_list_next(l); -- 2.7.4