From 411915fc34dc6d96775b36d2d1cb06cb729ea270 Mon Sep 17 00:00:00 2001 From: David Su Date: Mon, 3 Aug 2020 14:43:41 -0700 Subject: 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 --- service/java/com/android/server/wifi/SupplicantStaIfaceHal.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'service') 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 { -- cgit v1.2.3