mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-11 13:06:56 +03:00
Fix crash if content file is not found (was caused by !3249)
This commit is contained in:
parent
84e71f4977
commit
b5f4cec725
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,7 +584,8 @@ namespace MWWorld
|
||||||
World::~World()
|
World::~World()
|
||||||
{
|
{
|
||||||
// Must be cleared before mRendering is destroyed
|
// Must be cleared before mRendering is destroyed
|
||||||
mProjectileManager->clear();
|
if (mProjectileManager)
|
||||||
|
mProjectileManager->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::setRandomSeed(uint32_t seed)
|
void World::setRandomSeed(uint32_t seed)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue