Fix destruction issues relating to AllocationAdapter.

bug 12971201

Change-Id: I3d9f66f527a35837ac866a695bdcc41d908a2562
This commit is contained in:
Tim Murray
2014-02-12 11:16:17 -08:00
parent d7043f0084
commit 6d63c84f44
2 changed files with 2 additions and 2 deletions

View File

@@ -122,7 +122,8 @@ public class BaseObj {
// must include nObjDestroy in the critical section
ReentrantReadWriteLock.ReadLock rlock = mRS.mRWLock.readLock();
rlock.lock();
if(mRS.isAlive()) {
// AllocationAdapters are BaseObjs with an ID of 0 but should not be passed to nObjDestroy
if(mRS.isAlive() && mID != 0) {
mRS.nObjDestroy(mID);
}
rlock.unlock();