1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +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,7 +584,8 @@ namespace MWWorld
World::~World()
{
// Must be cleared before mRendering is destroyed
mProjectileManager->clear();
if (mProjectileManager)
mProjectileManager->clear();
}
void World::setRandomSeed(uint32_t seed)