From: zaxl Date: Wed, 22 Oct 2008 23:07:31 +0000 (+0000) Subject: FIX:core:Do not crash if item speed is zero X-Git-Tag: navit-0.5.0.5194svn~3618 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51b22c6d314ac5ce3d7c2cf387a1ad31115a1471;p=profile%2Fivi%2Fnavit.git FIX:core:Do not crash if item speed is zero git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1539 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- diff --git a/navit/navit/route.c b/navit/navit/route.c index 0f5e995..3fb20f1 100644 --- a/navit/navit/route.c +++ b/navit/navit/route.c @@ -1061,7 +1061,8 @@ route_graph_destroy(struct route_graph *this) int route_time(int *speedlist, struct item *item, int len) { - if (item->type < route_item_first || item->type > route_item_last) { + if (item->type < route_item_first || item->type > route_item_last + || !speedlist[item->type-route_item_first]) { dbg(0,"street type %d out of range [%d,%d]", item->type, route_item_first, route_item_last); return len*36; }