diff options
author | mdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-02-11 20:46:56 +0000 |
---|---|---|
committer | mdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-02-11 20:46:56 +0000 |
commit | 32e884050ebf793afc7101adc96b4b6bff03c8b1 (patch) | |
tree | e8ba3344dfd2a692828524af10b878fc9a0c3c23 /navit/vehicle.c | |
parent | 08a3f1c23f2839379cf0fe0a4294aaeae91d9b77 (diff) | |
download | navit-svn-32e884050ebf793afc7101adc96b4b6bff03c8b1.tar.gz |
Fix:core:Fix navit crashing when nonexistant vehicle type is specified in navit.xml.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4933 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/vehicle.c')
-rw-r--r-- | navit/vehicle.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/navit/vehicle.c b/navit/vehicle.c index e15f7610..4d46be74 100644 --- a/navit/vehicle.c +++ b/navit/vehicle.c @@ -171,6 +171,8 @@ vehicle_ref(struct vehicle *this_) void vehicle_unref(struct vehicle *this_) { + if(!this_) + return; this_->refcount--; dbg(0,"refcount %d\n",this_->refcount); if (this_->refcount <= 0) |