summaryrefslogtreecommitdiff
path: root/navit/vehicle.c
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-11-21 09:47:43 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-11-21 09:47:43 +0000
commit7a98ed3ffed7c3c49fea751978ce5fc96cea71fd (patch)
tree96d2c48cb2b5b9f517d14c15b96cad7cd6fad0ad /navit/vehicle.c
parent1d3424b43a0223063fcdd932a9914684c810b276 (diff)
downloadnavit-7a98ed3ffed7c3c49fea751978ce5fc96cea71fd.tar.gz
Fix:Core:Avoid drawing cursor with no shape
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2779 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/vehicle.c')
-rw-r--r--navit/vehicle.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/navit/vehicle.c b/navit/vehicle.c
index cf9331861..dd0c74983 100644
--- a/navit/vehicle.c
+++ b/navit/vehicle.c
@@ -310,6 +310,8 @@ vehicle_draw(struct vehicle *this_, struct graphics *gra, struct point *pnt, int
angle+=360;
dbg(1,"enter this=%p gra=%p pnt=%p lazy=%d dir=%d speed=%d\n", this_, gra, pnt, lazy, angle, speed);
dbg(1,"point %d,%d\n", pnt->x, pnt->y);
+ if (!this_->cursor)
+ return;
this_->cursor_pnt=*pnt;
this_->cursor_pnt.x-=this_->cursor->w/2;
this_->cursor_pnt.y-=this_->cursor->h/2;