diff --git a/CHANGELOG.md b/CHANGELOG.md index 16ac87298f..6bc4e3821d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -223,6 +223,7 @@ Bug #8223: Ghosts don't move while spellcasting Bug #8231: AGOP doesn't like NiCollisionSwitch Bug #8237: Non-bipedal creatures should *not* use spellcast equip/unequip animations + Bug #8252: Plugin dependencies are not required to be loaded Feature #1415: Infinite fall failsafe Feature #2566: Handle NAM9 records for manual cell references Feature #3501: OpenMW-CS: Instance Editing - Shortcuts for axial locking diff --git a/apps/openmw/mwworld/esmloader.cpp b/apps/openmw/mwworld/esmloader.cpp index 0be90c65f0..ebdd40303a 100644 --- a/apps/openmw/mwworld/esmloader.cpp +++ b/apps/openmw/mwworld/esmloader.cpp @@ -45,9 +45,10 @@ namespace MWWorld reader->open(filepath); reader->resolveParentFileIndices(mReaders); - assert(reader->getGameFiles().size() == reader->getParentFileIndices().size()); - for (std::size_t i = 0, n = reader->getParentFileIndices().size(); i < n; ++i) - if (i == static_cast(reader->getIndex())) + const std::vector& parentIndices = reader->getParentFileIndices(); + assert(reader->getGameFiles().size() == parentIndices.size()); + for (std::size_t i = 0, n = parentIndices.size(); i < n; ++i) + if (parentIndices[i] == reader->getIndex()) throw std::runtime_error("File " + Files::pathToUnicodeString(reader->getName()) + " asks for parent file " + reader->getGameFiles()[i].name + ", but it is not available or has been loaded in the wrong order. "