mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-26 06:40:22 +00:00
Check death counts are for valid actors before loading them
This commit is contained in:
parent
f24b807edc
commit
5a5cb1a160
@ -1767,9 +1767,12 @@ namespace MWMechanics
|
||||
while (reader.isNextSub("ID__"))
|
||||
{
|
||||
std::string id = reader.getHString();
|
||||
int count;
|
||||
reader.getHNT (count, "COUN");
|
||||
mDeathCount[id] = count;
|
||||
if (MWBase::Environment::get().getWorld()->getStore().find(id))
|
||||
{
|
||||
int count;
|
||||
reader.getHNT(count, "COUN");
|
||||
mDeathCount[id] = count;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user