From fde6cad24b4d60f3c73b0ce52f4bf44d3e2ea615 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 30 Aug 2014 18:25:13 +0200 Subject: [PATCH] Reset RefNum when copying a reference to a new cell --- apps/openmw/mwworld/class.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwworld/class.cpp b/apps/openmw/mwworld/class.cpp index d241278d14..59fc86d0d6 100644 --- a/apps/openmw/mwworld/class.cpp +++ b/apps/openmw/mwworld/class.cpp @@ -358,7 +358,7 @@ namespace MWWorld Class::copyToCell(const Ptr &ptr, CellStore &cell) const { Ptr newPtr = copyToCellImpl(ptr, cell); - + newPtr.getCellRef().unsetRefNum(); // This RefNum is only valid within the original cell of the reference return newPtr; }