1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 15:39:02 +00:00

Fix dangling reference.

This commit is contained in:
florent.teppe 2023-01-02 19:47:12 +01:00
parent 563324bcff
commit 1b66be9c70

View File

@ -1172,7 +1172,7 @@ 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();
const std::string cellId = mCells.getId(index).getRefIdString();
mRefs.load(*mReader, index, mBase, mRefLoadCache[cellId], messages);
break;