Make it possible to skip coordinates
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 1 Jan 2006 16:34:47 +0000 (16:34 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 1 Jan 2006 16:34:47 +0000 (16:34 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@47 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/src/street_data.h

index a770143..7f3a507 100644 (file)
@@ -49,8 +49,10 @@ static inline int street_get_coord(unsigned char **pos, int bytes, struct coord
                y|=(*p++) << 16;
                y|=(*p++) << 24;
        }
-       f->x=ref[0].x+x;
-       f->y=ref[1].y+y;         
+       if (f) {
+               f->x=ref[0].x+x;
+               f->y=ref[1].y+y;
+       }
 #if 0
        printf("0x%x,0x%x + 0x%x,0x%x = 0x%x,0x%x", x, y, ref[0].x, ref[1].y, f->x, f->y);
 #endif