Add object validity checking.

Change-Id: I2613e87b09a6e560f0381d4ed620d60a10bc30e4
This commit is contained in:
Jason Sams
2010-09-30 18:15:52 -07:00
parent 3cfc508f4e
commit f166d9b5a2
7 changed files with 77 additions and 14 deletions

View File

@ -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;
}