diff options
author | zaxl <zaxl@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-10-22 22:14:46 +0000 |
---|---|---|
committer | zaxl <zaxl@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-10-22 22:14:46 +0000 |
commit | 14803e881eacd0b04d4654e51464e7bb0b3fbe8e (patch) | |
tree | c5b4af65857707b77070d95a038cb80c152c308c /navit/plugin.c | |
parent | 3650defd1794420039c9b5d992ccd1e10b3c9a9b (diff) | |
download | navit-svn-14803e881eacd0b04d4654e51464e7bb0b3fbe8e.tar.gz |
FIX:core:fix the fix do not crash if plugins are not in config
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1538 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/plugin.c')
-rw-r--r-- | navit/plugin.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/navit/plugin.c b/navit/plugin.c index 8650a614..d3fdf441 100644 --- a/navit/plugin.c +++ b/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"; |