Merge "Check ManagedResource is NonNull before Checking Owner"
This commit is contained in:
commit
0d1e9bb5b8
1 changed files with 5 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue