Fix crash with multiple mods
@@ -63,7 +63,6 @@ void ScriptStore::LoadAll()
if (ctx.IsValid())
{
const auto ctxIt = m_contexts.emplace(name, std::move(ctx));
- m_vkBinds.insert({name, ctxIt.first.value().GetBinds()});
consoleLogger->info("Mod {} loaded! ('{}')", name, fPathStr);
}
else
@@ -72,6 +71,9 @@ void ScriptStore::LoadAll()
}
}
+ for (auto& contextIt : m_contexts)
+ m_vkBinds.insert({contextIt.first, contextIt.second.GetBinds()});
+
m_bindings.InitializeMods(m_vkBinds);
}
