From a8c838b53a056353e6871824602a66a0120873fc Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 27 Nov 2013 18:43:42 +0100 Subject: [PATCH] Don't list deleted refs in CellStore::foreach --- apps/openmw/mwworld/cellstore.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwworld/cellstore.hpp b/apps/openmw/mwworld/cellstore.hpp index bcbc5e415a..8a01caf183 100644 --- a/apps/openmw/mwworld/cellstore.hpp +++ b/apps/openmw/mwworld/cellstore.hpp @@ -140,9 +140,12 @@ namespace MWWorld { for (typename List::List::iterator iter (list.mList.begin()); iter!=list.mList.end(); ++iter) + { + if (!iter->mData.getCount()) + continue; if (!functor (iter->mRef, iter->mData)) return false; - + } return true; }