Fix deleted objects being accessible in the Cells cache

openmw-38
scrawl 9 years ago
parent deb7f3caf6
commit e564c26314

@ -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)

Loading…
Cancel
Save