summaryrefslogtreecommitdiff
path: root/navit/map
diff options
context:
space:
mode:
authormdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220>2012-11-09 22:09:37 +0000
committermdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220>2012-11-09 22:09:37 +0000
commite92b40813bcb909761710f3d6b46f0b6cd379fda (patch)
tree0f8c91fbd5628d0a7791dfd8cb7713c084278364 /navit/map
parent016b36651071697726b3f138be2738ca441b7ac9 (diff)
downloadnavit-svn-e92b40813bcb909761710f3d6b46f0b6cd379fda.tar.gz
Add:core:Better waypoints handling, see #1040 |Based on ideas & patches from pini and antiram
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5264 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/map')
-rw-r--r--navit/map/textfile/textfile.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/navit/map/textfile/textfile.c b/navit/map/textfile/textfile.c
index c9713cd8..551a2ac1 100644
--- a/navit/map/textfile/textfile.c
+++ b/navit/map/textfile/textfile.c
@@ -97,9 +97,11 @@ textfile_coord_get(void *priv_data, struct coord *c, int count)
dbg(1,"enter, count: %d\n",count);
while (count--) {
if (mr->f && !feof(mr->f) && (!mr->item.id_hi || !mr->eoc) && parse_line(mr, mr->item.id_hi)) {
- *c=mr->c;
- dbg(1,"c=0x%x,0x%x\n", c->x, c->y);
- c++;
+ if (c){
+ *c=mr->c;
+ dbg(1,"c=0x%x,0x%x\n", c->x, c->y);
+ c++;
+ }
ret++;
get_line(mr);
if (mr->item.id_hi)