From: Kaj-Michael Lang Date: Thu, 10 Apr 2008 14:58:41 +0000 (+0300) Subject: Make sure _next_way is set before using it X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44187d382db9596632ab974162cb9725f8c9c52e;p=mapper Make sure _next_way is set before using it --- diff --git a/src/route.c b/src/route.c index fec0c8e..5b1c840 100644 --- a/src/route.c +++ b/src/route.c @@ -84,6 +84,9 @@ if (!gps) if (!_announce_waypoints) return; +if (!_next_way) + return; + announce_thres_unsquared=(20+(guint)gps->speed)*_announce_notice_ratio*3; if (_next_way_dist_squared < (announce_thres_unsquared * announce_thres_unsquared))