--- trunk/src/icons.c 2009/07/29 19:24:15 34 +++ trunk/src/icons.c 2009/08/06 20:23:12 47 @@ -210,7 +210,8 @@ } GdkPixbuf *icon_bearing(pos_t from, pos_t to) { - if(isnan(from.lat) && isnan(from.lon)) + if(isnan(from.lat) || isnan(from.lon) || + isnan(to.lat) || isnan(to.lon)) return icon_get(ICON_HEADING, 8); int idx = (gpx_pos_get_bearing(from, to)+22.5)/45.0;