mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-05 20:15:33 +00:00
Catch exceptions in ResolutionListener
This commit is contained in:
parent
301411c5c5
commit
b91be1e803
1 changed files with 17 additions and 3 deletions
|
@ -76,11 +76,25 @@ namespace
|
|||
MWWorld::ResolutionListener::~ResolutionListener()
|
||||
{
|
||||
if(!mStore.mModified && mStore.mResolved && !mStore.mPtr.isEmpty())
|
||||
{
|
||||
try
|
||||
{
|
||||
for(const auto&& ptr : mStore)
|
||||
ptr.getRefData().setCount(0);
|
||||
}
|
||||
catch(const std::exception& e)
|
||||
{
|
||||
Log(Debug::Warning) << "Failed to clear temporary container contents of " << mStore.mPtr.get<ESM::Container>()->mBase->mId << ": " << e.what();
|
||||
}
|
||||
mStore.fillNonRandom(mStore.mPtr.get<ESM::Container>()->mBase->mInventory, "", mStore.mSeed);
|
||||
try
|
||||
{
|
||||
addScripts(mStore, mStore.mPtr.mCell);
|
||||
}
|
||||
catch(const std::exception& e)
|
||||
{
|
||||
Log(Debug::Warning) << "Failed to restart item scripts inside " << mStore.mPtr.get<ESM::Container>()->mBase->mId << ": " << e.what();
|
||||
}
|
||||
mStore.mResolved = false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue