summaryrefslogtreecommitdiff
path: root/navit/attr.c
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-11-03 17:32:14 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-11-03 17:32:14 +0000
commit2956b0b9d95ccc13b49e742c3ea36b01f92265c9 (patch)
tree5447d0857c6f9399cfb63386d7d9eef9ca55aed3 /navit/attr.c
parent082f0a70cb2de44169e0ebd3bc09a708aaa997c4 (diff)
downloadnavit-2956b0b9d95ccc13b49e742c3ea36b01f92265c9.tar.gz
Fix:Core:Fixed and cleaned up navigation
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1630 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/attr.c')
-rw-r--r--navit/attr.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/navit/attr.c b/navit/attr.c
index eba8a0844..53fc5a014 100644
--- a/navit/attr.c
+++ b/navit/attr.c
@@ -192,8 +192,14 @@ attr_to_text(struct attr *attr, struct map *map, int pretty)
}
if (type >= attr_type_string_begin && type <= attr_type_string_end) {
if (map) {
- char *mstr=map_convert_string(map, attr->u.str);
- ret=g_strdup(mstr);
+ char *mstr;
+ if (attr->u.str) {
+ mstr=map_convert_string(map, attr->u.str);
+ ret=g_strdup(mstr);
+ map_convert_free(mstr);
+ } else
+ ret=g_strdup("(null)");
+
} else
ret=g_strdup(attr->u.str);
return ret;