1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-06 07:15:36 +00:00

Fix coverity warning in esm3/globalscript.cpp

This commit is contained in:
Petr Mikheev 2023-08-09 10:21:41 +02:00
parent a8ed567177
commit f5ddffa087

View file

@ -19,7 +19,11 @@ namespace ESM
mTargetId = esm.getHNORefId("TARG");
if (esm.peekNextSub("FRMR"))
mTargetRef = esm.getFormId(true, "FRMR");
esm.applyContentFileMapping(mTargetRef);
if (!esm.applyContentFileMapping(mTargetRef))
{
mTargetId = ESM::RefId();
mTargetRef = ESM::FormId();
}
}
void GlobalScript::save(ESMWriter& esm) const