diff --git a/apps/opencs/model/world/data.cpp b/apps/opencs/model/world/data.cpp index 09296b55d6..a6268c1a48 100644 --- a/apps/opencs/model/world/data.cpp +++ b/apps/opencs/model/world/data.cpp @@ -1209,9 +1209,8 @@ bool CSMWorld::Data::continueLoading(CSMDoc::Messages& messages) messages.add(id, "Logic error: cell index out of bounds", "", CSMDoc::Message::Severity_Error); index = mCells.getSize() - 1; } - const std::string cellId = mCells.getId(index).getRefIdString(); - mRefs.load(*mReader, index, mBase, mRefLoadCache[cellId], messages); + mRefs.load(*mReader, index, mBase, mRefLoadCache[mCells.getId(index)], messages); break; } diff --git a/apps/opencs/model/world/data.hpp b/apps/opencs/model/world/data.hpp index 6db992cca6..42c5309723 100644 --- a/apps/opencs/model/world/data.hpp +++ b/apps/opencs/model/world/data.hpp @@ -123,7 +123,7 @@ namespace CSMWorld const ESM::Dialogue* mDialogue; // last loaded dialogue bool mBase; bool mProject; - std::map, Misc::StringUtils::CiComp> mRefLoadCache; + std::map> mRefLoadCache; int mReaderIndex; bool mFsStrict;