summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-05-04 16:52:42 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-05-04 16:52:42 +0000
commitfb27aefab25dfbb67abe24cd17b6bcddc0734b54 (patch)
treeb23f70b041b77e95a345b564223ffe022b572e9f
parent27dd6731c63cff7282a7c1ee6248f47d44dbd04e (diff)
downloadnavit-svn-fb27aefab25dfbb67abe24cd17b6bcddc0734b54.tar.gz
Fix:Core:Fixed vehicle switching
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit/src@1040 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r--navit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/navit.c b/navit.c
index 3bb95278..f3efa04d 100644
--- a/navit.c
+++ b/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);