FIX:core:Do not crash if no plugins are loaded
authorzaxl <zaxl@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Wed, 22 Oct 2008 22:06:42 +0000 (22:06 +0000)
committerzaxl <zaxl@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Wed, 22 Oct 2008 22:06:42 +0000 (22:06 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1536 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/plugin.c

index 126aa2e..8650a61 100644 (file)
@@ -260,6 +260,8 @@ 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;