summaryrefslogtreecommitdiff
path: root/navit/attr.c
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2012-12-25 17:22:19 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2012-12-25 17:22:19 +0000
commit795ea25fcf9e1c250b9f29f8e9e5da334d0c2ed9 (patch)
tree0626df2ca432b43b6f9a0569dd1d636df83a874d /navit/attr.c
parent2ac3192de78aa0ce14ea37600325cab0c561b09a (diff)
downloadnavit-795ea25fcf9e1c250b9f29f8e9e5da334d0c2ed9.tar.gz
Fix:Core:Handle null attribute correctly
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5326 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/attr.c')
-rw-r--r--navit/attr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/navit/attr.c b/navit/attr.c
index 6fd5edfe6..ffe0f1add 100644
--- a/navit/attr.c
+++ b/navit/attr.c
@@ -522,6 +522,8 @@ attr_type_begin(enum attr_type type)
int
attr_data_size(struct attr *attr)
{
+ if (attr->type == attr_none)
+ return 0;
if (attr->type >= attr_type_string_begin && attr->type <= attr_type_string_end)
return strlen(attr->u.str)+1;
if (attr->type >= attr_type_int_begin && attr->type <= attr_type_int_end)