From 2956b0b9d95ccc13b49e742c3ea36b01f92265c9 Mon Sep 17 00:00:00 2001 From: martin-s Date: Mon, 3 Nov 2008 17:32:14 +0000 Subject: 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 --- navit/attr.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'navit/attr.c') 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; -- cgit v1.2.1