1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-01 11:09:42 +00:00

Merge branch 'fix_crach_missing_content_file' into 'master'

Fix crash if content file is not found (was caused by !3249)

See merge request OpenMW/openmw!3323
This commit is contained in:
Alexei Kotov 2023-08-11 18:29:52 +00:00
commit f2a9ab52db
2 changed files with 6 additions and 4 deletions

View file

@ -673,9 +673,6 @@ void OMW::Engine::prepareEngine()
mLuaManager = std::make_unique<MWLua::LuaManager>(mVFS.get(), mResDir / "lua_libs");
mEnvironment.setLuaManager(*mLuaManager);
// starts a separate lua thread if "lua num threads" > 0
mLuaWorker = std::make_unique<MWLua::Worker>(*mLuaManager, *mViewer);
// Create input and UI first to set up a bootstrapping environment for
// showing a loading screen and keeping the window responsive while doing so
@ -760,6 +757,7 @@ void OMW::Engine::prepareEngine()
using namespace std::chrono_literals;
while (dataLoading.wait_for(50ms) != std::future_status::ready)
asyncListener.update();
dataLoading.get();
}
listener->loadingOff();
@ -835,6 +833,9 @@ void OMW::Engine::prepareEngine()
mLuaManager->init();
mLuaManager->loadPermanentStorage(mCfgMgr.getUserConfigPath());
// starts a separate lua thread if "lua num threads" > 0
mLuaWorker = std::make_unique<MWLua::Worker>(*mLuaManager, *mViewer);
}
// Initialise and enter main loop.

View file

@ -584,6 +584,7 @@ namespace MWWorld
World::~World()
{
// Must be cleared before mRendering is destroyed
if (mProjectileManager)
mProjectileManager->clear();
}