1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-28 22:09:42 +00:00

Fix a crash in aipackage.cpp

This commit is contained in:
jvoisin 2021-05-13 13:58:56 +02:00
parent e74ea56434
commit bcd8190516

View file

@ -15,7 +15,12 @@ namespace ESM
{
AIPackage pack;
if (esm.retSubName() == AI_CNDT) {
mList.back().mCellName = esm.getHString();
if (mList.empty())
{
esm.fail("AIPackge with an AI_CNDT applying to no cell.");
} else {
mList.back().mCellName = esm.getHString();
}
} else if (esm.retSubName() == AI_Wander) {
pack.mType = AI_Wander;
esm.getHExact(&pack.mWander, 14);