this_->use_mousewheel=!!attr->u.num;
break;
case attr_vehicle:
+ if (!attr->u.vehicle) {
+ if (this_->vehicle) {
+ vehicle_set_attr(this_->vehicle->vehicle, &active);
+ navit_set_vehicle(this_, NULL);
+ attr_updated=1;
+ }
+ break;
+ }
l=this_->vehicles;
while(l) {
nv=l->data;
{
struct attr attr;
this_->vehicle=nv;
- if (nv && vehicle_get_attr(nv->vehicle, attr_profilename, &attr, NULL)) {
+ if (!nv)
+ return;
+ if (vehicle_get_attr(nv->vehicle, attr_profilename, &attr, NULL)) {
if (navit_set_vehicleprofile(this_, attr.u.str))
return;
}