From: zaxl Date: Wed, 22 Oct 2008 22:14:46 +0000 (+0000) Subject: FIX:core:fix the fix do not crash if plugins are not in config X-Git-Tag: navit-0.5.0.5194svn~3619 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e3aa8950cf9d2b85a838e691d5cfe40736f680e;p=profile%2Fivi%2Fnavit.git FIX:core:fix the fix do not crash if plugins are not in config git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1538 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- diff --git a/navit/navit/plugin.c b/navit/navit/plugin.c index 8650a61..d3fdf44 100644 --- a/navit/navit/plugin.c +++ b/navit/navit/plugin.c @@ -260,8 +260,6 @@ plugin_get_type(enum plugin_type type, const char *type_name, const char *name) struct name_val *nv; struct plugin *pl; char *mod_name, *filename=NULL, *corename=NULL; - if (!pls) - return NULL; l=plugin_types[type]; while (l) { nv=l->data; @@ -269,6 +267,8 @@ plugin_get_type(enum plugin_type type, const char *type_name, const char *name) return nv->val; l=g_list_next(l); } + if (!pls) + return NULL; lpls=pls->list; if(!g_ascii_strcasecmp(type_name, "map")) type_name="data";