segfault in vlc_module_load
When starting after a fresh build (trying to build static... not going well so far) it segfaults in vlc_module_load, defined in src/modules/modules.c.
After a bit of investigation I found that at line 259, the function module_list_get may return a NULL pointer (setting count to 0), but on line 263 count is discarded, and p_all is never checked for being null.
the attached patch fixed this issue