diff --git a/components/esm3/loaddial.cpp b/components/esm3/loaddial.cpp index c8ac1b40c3..5aa8a29b09 100644 --- a/components/esm3/loaddial.cpp +++ b/components/esm3/loaddial.cpp @@ -87,8 +87,14 @@ namespace ESM if (lookup != mLookup.end()) { auto it = lookup->second.first; - // Since the new version of this record may have changed the next/prev linked list connection, we need to - // re-insert the record + if (it->mPrev == info.mPrev) + { + *it = info; + lookup->second.second = isDeleted; + return; + } + // Since the new version of this record has a different prev linked list connection, we need to re-insert + // the record mInfo.erase(it); mLookup.erase(lookup); }