]> err.no Git - mapper/commitdiff
Make sure _next_way is set before using it
authorKaj-Michael Lang <milang@tal.org>
Thu, 10 Apr 2008 14:58:41 +0000 (17:58 +0300)
committerKaj-Michael Lang <milang@tal.org>
Thu, 10 Apr 2008 14:58:41 +0000 (17:58 +0300)
src/route.c

index fec0c8e746858423e03bb40177c9571299b477b6..5b1c8400841f9fda9969c52caa068b1ef642c4c5 100644 (file)
@@ -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))