Fix:Core:Avoid drawing cursor with no shape
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sat, 21 Nov 2009 09:47:43 +0000 (09:47 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sat, 21 Nov 2009 09:47:43 +0000 (09:47 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit@2779 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/vehicle.c

index cf93318..dd0c749 100644 (file)
@@ -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;