Fix deleted containers showing in merchant inventories

moveref
scrawl 10 years ago
parent f3738e9a98
commit 9ed71765a9

@ -2259,6 +2259,8 @@ namespace MWWorld
for (CellRefList<ESM::Container>::List::iterator container = refList.begin(); container != refList.end(); ++container)
{
MWWorld::Ptr ptr (&*container, *cellIt);
if (ptr.getRefData().isDeleted())
continue;
if (Misc::StringUtils::ciEqual(ptr.getCellRef().getOwner(), npc.getCellRef().getRefId()))
out.push_back(ptr);
}

Loading…
Cancel
Save