From 1b66be9c7035d7e33de8224a9410f9dc59b10b80 Mon Sep 17 00:00:00 2001 From: "florent.teppe" Date: Mon, 2 Jan 2023 19:47:12 +0100 Subject: [PATCH] Fix dangling reference. --- apps/opencs/model/world/data.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/opencs/model/world/data.cpp b/apps/opencs/model/world/data.cpp index 450613ce5a..da77405d29 100644 --- a/apps/opencs/model/world/data.cpp +++ b/apps/opencs/model/world/data.cpp @@ -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;