mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-01 14: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:
commit
f2a9ab52db
2 changed files with 6 additions and 4 deletions
|
@ -673,9 +673,6 @@ void OMW::Engine::prepareEngine()
|
||||||
mLuaManager = std::make_unique<MWLua::LuaManager>(mVFS.get(), mResDir / "lua_libs");
|
mLuaManager = std::make_unique<MWLua::LuaManager>(mVFS.get(), mResDir / "lua_libs");
|
||||||
mEnvironment.setLuaManager(*mLuaManager);
|
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
|
// Create input and UI first to set up a bootstrapping environment for
|
||||||
// showing a loading screen and keeping the window responsive while doing so
|
// 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;
|
using namespace std::chrono_literals;
|
||||||
while (dataLoading.wait_for(50ms) != std::future_status::ready)
|
while (dataLoading.wait_for(50ms) != std::future_status::ready)
|
||||||
asyncListener.update();
|
asyncListener.update();
|
||||||
|
dataLoading.get();
|
||||||
}
|
}
|
||||||
listener->loadingOff();
|
listener->loadingOff();
|
||||||
|
|
||||||
|
@ -835,6 +833,9 @@ void OMW::Engine::prepareEngine()
|
||||||
|
|
||||||
mLuaManager->init();
|
mLuaManager->init();
|
||||||
mLuaManager->loadPermanentStorage(mCfgMgr.getUserConfigPath());
|
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.
|
// Initialise and enter main loop.
|
||||||
|
|
|
@ -584,6 +584,7 @@ namespace MWWorld
|
||||||
World::~World()
|
World::~World()
|
||||||
{
|
{
|
||||||
// Must be cleared before mRendering is destroyed
|
// Must be cleared before mRendering is destroyed
|
||||||
|
if (mProjectileManager)
|
||||||
mProjectileManager->clear();
|
mProjectileManager->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue