From: horwitz Date: Tue, 5 Jan 2010 12:32:24 +0000 (+0000) Subject: Fix:Core:Prevent segfault(fixes #529)|Thanks Pini for the patch. X-Git-Url: http://git.maemo.org/git/?a=commitdiff_plain;ds=sidebyside;h=8e995cb265c6bf9e5311b7a93e2e6d1fb8f9cc47;p=navit-package Fix:Core:Prevent segfault(fixes #529)|Thanks Pini for the patch. git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit@2896 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- diff --git a/navit/command.c b/navit/command.c index 4d83082..6872522 100644 --- a/navit/command.c +++ b/navit/command.c @@ -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);