commit | 605048a9f9af925782f6c90bc1cdc5af59e337d8 | [log] [tgz] |
---|---|---|
author | Jason Sams <rjsams@android.com> | Thu Sep 30 18:15:52 2010 -0700 |
committer | Jason Sams <rjsams@android.com> | Thu Sep 30 18:15:52 2010 -0700 |
tree | 5d852abb01b5ea2411abd8560d6772463011c349 | |
parent | 01b7d2995f9cbd33a9ccdf861fe959743a4b9954 [diff] [blame] |
Add object validity checking. Change-Id: I2613e87b09a6e560f0381d4ed620d60a10bc30e4
diff --git a/rsObjectBase.cpp b/rsObjectBase.cpp index 713d61e..f69cb15 100644 --- a/rsObjectBase.cpp +++ b/rsObjectBase.cpp
@@ -195,3 +195,15 @@ } } +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; +} +