From 47f7bbd48a57a5a579e81a8bc4afdeaf2a651552 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Tue, 16 Jul 2013 12:08:35 +0200 Subject: [PATCH] fixed OpenCS crash during cell loading when loading multiple ESX files --- apps/opencs/model/world/refcollection.cpp | 2 -- components/esm/loadcell.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/opencs/model/world/refcollection.cpp b/apps/opencs/model/world/refcollection.cpp index fd191ba139..6a1e8045b3 100644 --- a/apps/opencs/model/world/refcollection.cpp +++ b/apps/opencs/model/world/refcollection.cpp @@ -16,8 +16,6 @@ void CSMWorld::RefCollection::load (ESM::ESMReader& reader, int cellIndex, bool Cell& cell2 = base ? cell.mBase : cell.mModified; - cell2.restore (reader, 0); /// \todo fix the index - CellRef ref; while (cell2.getNextRef (reader, ref)) diff --git a/components/esm/loadcell.cpp b/components/esm/loadcell.cpp index b1f9986be4..dbd1fed6f0 100644 --- a/components/esm/loadcell.cpp +++ b/components/esm/loadcell.cpp @@ -122,7 +122,7 @@ void Cell::save(ESMWriter &esm) void Cell::restore(ESMReader &esm, int iCtx) const { - esm.restoreContext(mContextList[iCtx]); + esm.restoreContext(mContextList.at (iCtx)); } std::string Cell::getDescription() const