]> err.no Git - mapper/commitdiff
Fix quick poi sigsegv, _track is now dynamic
authorKaj-Michael Lang <milang@tal.org>
Tue, 1 Apr 2008 11:35:15 +0000 (14:35 +0300)
committerKaj-Michael Lang <milang@tal.org>
Tue, 1 Apr 2008 11:35:15 +0000 (14:35 +0300)
src/path.c
src/poi-gui.c

index f0b454f76acc10beff9f8eaaf301ee260b06d09e..197daacaeca9436a75ec1e28487ec2f7aa0a92a3 100644 (file)
@@ -123,6 +123,7 @@ return TRUE;
 void 
 path_insert_mark_text(Path *path, gchar *text)
 {
+g_assert(path);
 MACRO_PATH_INCREMENT_WTAIL(*path);
 path->wtail->point = path->tail;
 path->wtail->desc = text;
index fd55bb7765b26191e7f06e98bd03e44ec8d1e7ec..55fa51a4da8b38dac72d2106b4f75210a03eb6e5 100644 (file)
@@ -1006,7 +1006,7 @@ if (poi_add(p)==FALSE) {
        /* Add a text break to the current track */
        /* XXX: Get category string in here if label is empty */
        txt=g_strdup_printf("QP(%d): %f %f %s", p->cat_id, p->lat, p->lon, p->label);
-       path_insert_mark_text(&_track, txt);
+       path_insert_mark_text(_track, txt);
 
        map_force_redraw();
        if (qpdata->close==TRUE)