From: Kaj-Michael Lang Date: Thu, 25 Oct 2007 12:44:34 +0000 (+0300) Subject: Check that route waypoint point is valid X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6277e6151a2b02cbfb4a50ddea219b29d19cb32c;p=mapper Check that route waypoint point is valid --- diff --git a/src/route.c b/src/route.c index f3e064b..fbbf747 100644 --- a/src/route.c +++ b/src/route.c @@ -756,10 +756,15 @@ gfloat sum=0.0; if (_route.whead==_route.wtail) return NULL; -store = gtk_list_store_new(ROUTE_NUM_COLUMNS,G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); wcurr = _route.whead; + +if (!wcurr->point) + return NULL; + unit2latlon(wcurr->point->unitx, wcurr->point->unity, lat1, lon1); +store = gtk_list_store_new(ROUTE_NUM_COLUMNS,G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); + while (wcurr!=_route.wtail) { if (!wcurr) break;