Merge "Check ManagedResource is NonNull before Checking Owner" am: 0d1e9bb5b8 am: 83dee33162
am: 43d17a6785 Change-Id: I97f1cda1efc1fb7d699b34ab725a205d3143bdad
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user