diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 8e9d981c1..a099f71cc 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -1035,11 +1035,11 @@ namespace MWWorld { std::vector result; - MWWorld::CellRefList doors = cell->doors; - std::list< MWWorld::LiveCellRef > refList = doors.list; + MWWorld::CellRefList& doors = cell->doors; + std::list< MWWorld::LiveCellRef >& refList = doors.list; for (std::list< MWWorld::LiveCellRef >::iterator it = refList.begin(); it != refList.end(); ++it) { - MWWorld::LiveCellRef ref = *it; + MWWorld::LiveCellRef& ref = *it; if (ref.ref.teleport) {