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