Add object validity checking.
Change-Id: I2613e87b09a6e560f0381d4ed620d60a10bc30e4
This commit is contained in:
@ -195,3 +195,15 @@ void ObjectBase::dumpAll(Context *rsc)
|
||||
}
|
||||
}
|
||||
|
||||
bool ObjectBase::isValid(const Context *rsc, const ObjectBase *obj)
|
||||
{
|
||||
const ObjectBase * o = rsc->mObjHead;
|
||||
while (o) {
|
||||
if (o == obj) {
|
||||
return true;
|
||||
}
|
||||
o = o->mNext;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user