mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-22 07:41:36 +00:00
fixed for potential crash during saved game loading
This commit is contained in:
parent
0ce1732edb
commit
7785e3a0bc
1 changed files with 15 additions and 3 deletions
|
@ -160,10 +160,22 @@ namespace MWScript
|
||||||
{
|
{
|
||||||
if (const ESM::Script *scriptRecord = mStore.get<ESM::Script>().search (script.mId))
|
if (const ESM::Script *scriptRecord = mStore.get<ESM::Script>().search (script.mId))
|
||||||
{
|
{
|
||||||
GlobalScriptDesc desc;
|
try
|
||||||
desc.mLocals.configure (*scriptRecord);
|
{
|
||||||
|
GlobalScriptDesc desc;
|
||||||
|
desc.mLocals.configure (*scriptRecord);
|
||||||
|
|
||||||
iter = mScripts.insert (std::make_pair (script.mId, desc)).first;
|
iter = mScripts.insert (std::make_pair (script.mId, desc)).first;
|
||||||
|
}
|
||||||
|
catch (const std::exception& exception)
|
||||||
|
{
|
||||||
|
std::cerr
|
||||||
|
<< "Failed to add start script " << script.mId
|
||||||
|
<< " because an exception has been thrown: " << exception.what()
|
||||||
|
<< std::endl;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else // script does not exist anymore
|
else // script does not exist anymore
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue