diff options
author | David Su <dysu@google.com> | 2020-08-03 14:43:41 -0700 |
---|---|---|
committer | David Su <dysu@google.com> | 2020-08-03 22:19:37 +0000 |
commit | 411915fc34dc6d96775b36d2d1cb06cb729ea270 (patch) | |
tree | 353d789b496cca375a1f4c9f077f957d0c9f1612 /service | |
parent | b64129c61416da5a3817d328a7adb166485254ea (diff) |
SupplicantStaIfaceHal: check for null SupplicantStatus
NPE is unlikely to occur in practice, but add a check just in case.
Bug: 162705230
Test: atest FrameworksWifiTests
Change-Id: Id336551b22bba44d6315dc80e3df7589a7536d25
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/SupplicantStaIfaceHal.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java b/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java index 657b081dd..b8aa5bef3 100644 --- a/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java +++ b/service/java/com/android/server/wifi/SupplicantStaIfaceHal.java @@ -2556,7 +2556,7 @@ public class SupplicantStaIfaceHal { private boolean checkStatusAndLogFailure(SupplicantStatus status, final String methodStr) { synchronized (mLock) { - if (status.code != SupplicantStatusCode.SUCCESS) { + if (status == null || status.code != SupplicantStatusCode.SUCCESS) { Log.e(TAG, "ISupplicantStaIface." + methodStr + " failed: " + status); return false; } else { |