mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
Remove script access to deleted references that have no content file
In original MW these objects are permanently deleted and can not be accessed anymore.
This commit is contained in:
parent
f49fde3d5d
commit
9f90a1e44b
@ -27,7 +27,9 @@ namespace MWWorld
|
|||||||
LiveRef *find (const std::string& name)
|
LiveRef *find (const std::string& name)
|
||||||
{
|
{
|
||||||
for (typename List::iterator iter (mList.begin()); iter!=mList.end(); ++iter)
|
for (typename List::iterator iter (mList.begin()); iter!=mList.end(); ++iter)
|
||||||
if (iter->mRef.getRefId() == name)
|
if (!iter->mData.isDeletedByContentFile()
|
||||||
|
&& (iter->mRef.getRefNum().mContentFile != -1 || iter->mData.getCount() > 0)
|
||||||
|
&& iter->mRef.getRefId() == name)
|
||||||
return &*iter;
|
return &*iter;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user