From e564c2631494b5f52b673cdbc18672c386b56fb4 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 17 Dec 2015 20:17:53 +0100 Subject: [PATCH] Fix deleted objects being accessible in the Cells cache --- apps/openmw/mwworld/cells.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwworld/cells.cpp b/apps/openmw/mwworld/cells.cpp index 109447959..11b76df4e 100644 --- a/apps/openmw/mwworld/cells.cpp +++ b/apps/openmw/mwworld/cells.cpp @@ -173,7 +173,7 @@ MWWorld::Ptr MWWorld::Cells::getPtr (const std::string& name, CellStore& cell, Ptr ptr = cell.search (name); - if (!ptr.isEmpty()) + if (!ptr.isEmpty() && ptr.getRefData().getCount()) return ptr; if (searchInContainers)