Merge "Check ManagedResource is NonNull before Checking Owner"

am: 0d1e9bb5b8

Change-Id: I2e8cde8a7be8bdbdeebb00df053fdc621d30cdec
This commit is contained in:
nharold
2017-07-17 17:52:25 +00:00
committed by android-build-merger

View File

@@ -206,7 +206,11 @@ public class IpSecService extends IIpSecService.Stub {
T get(int key) {
T val = mArray.get(key);
val.checkOwnerOrSystemAndThrow();
// The value should never be null unless the resource doesn't exist
// (since we do not allow null resources to be added).
if (val != null) {
val.checkOwnerOrSystemAndThrow();
}
return val;
}