Fix:Core:Prevent segfault(fixes #529)|Thanks Pini for the patch.
authorhorwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 5 Jan 2010 12:32:24 +0000 (12:32 +0000)
committerhorwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Tue, 5 Jan 2010 12:32:24 +0000 (12:32 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit@2896 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/command.c

index 4d83082..6872522 100644 (file)
@@ -384,7 +384,7 @@ command_call_function(struct context *ctx, struct result *res)
                res->attr.type=list[0]->type;
                res->attr.u.str=g_strdup(gettext(list[0]->u.str));      
                
-       } if (!strncmp(function,"new ",4)) {
+       } else if (!strncmp(function,"new ",4)) {
                enum attr_type attr_type=attr_from_name(function+4);
                if (attr_type != attr_none) {
                        struct object_func *func=object_func_lookup(attr_type);