1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-05 15:55:45 +00:00

Reset RefNum when copying a reference to a new cell

This commit is contained in:
scrawl 2014-08-30 18:25:13 +02:00
parent 267cf4e140
commit fde6cad24b

View File

@ -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;
}