Don't allow resource records to become their own parents

This commit is contained in:
baldurk
2019-11-19 23:20:55 +00:00
parent 80183c068a
commit ba8186559d
+3
View File
@@ -310,6 +310,9 @@ struct ResourceRecord
~ResourceRecord() { SAFE_DELETE(m_ChunkLock); }
void AddParent(ResourceRecord *r)
{
if(r == this)
return;
if(Parents.find(r) == Parents.end())
{
r->AddRef();