From 6277e6151a2b02cbfb4a50ddea219b29d19cb32c Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Thu, 25 Oct 2007 15:44:34 +0300 Subject: [PATCH] Check that route waypoint point is valid --- src/route.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; -- 2.39.5