diff options
author | mdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-08-13 17:02:39 +0000 |
---|---|---|
committer | mdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2014-08-13 17:02:39 +0000 |
commit | 99d75e20060a9cce94a13acbc7ffa5c7c0db4b04 (patch) | |
tree | 48cae751052452e1f1d5790ecaade9e8869ee8b9 | |
parent | dd87b6bb6f717d06c5113166b0e775f01d8f83a7 (diff) | |
download | navit-99d75e20060a9cce94a13acbc7ffa5c7c0db4b04.tar.gz |
Fix:core:Do not crash on attempt to retrive an attribute missing from object, with command interpreter.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5868 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r-- | navit/attr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/navit/attr.c b/navit/attr.c index a47fc8a08..903bcc8f1 100644 --- a/navit/attr.c +++ b/navit/attr.c @@ -599,7 +599,7 @@ 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; + return attr->u.str?strlen(attr->u.str)+1:0; if (attr->type >= attr_type_int_begin && attr->type <= attr_type_int_end) return sizeof(attr->u.num); if (attr->type >= attr_type_coord_geo_begin && attr->type <= attr_type_coord_geo_end) |