Fix get_mod_load_order crash if mods with unfulfilled optional dependencies are enabled

This commit is contained in:
Lars Mueller 2021-09-20 20:34:36 +02:00
parent 77ac8ba640
commit 259f28c886

@ -307,8 +307,11 @@ function get_mod_load_order()
end
-- Now, try soft dependencies.
for depend in pairs(mod.optional_depends) do
-- Mod may not exist
if mod_info[depend] then
load(mod_info[depend])
end
end
mod.status = "loaded"
table.insert(mod_load_order, mod)
return true