mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-19 18:09:50 +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
1 changed files with 3 additions and 1 deletions
|
@ -27,7 +27,9 @@ namespace MWWorld
|
|||
LiveRef *find (const std::string& name)
|
||||
{
|
||||
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 0;
|
||||
|
|
Loading…
Reference in a new issue