commit | 79c5974c5923c6da8501dc20b679e11750930bbb | [log] [tgz] |
---|---|---|
author | Pavlin Radoslavov <pavlin@google.com> | Thu Apr 14 17:49:45 2016 -0700 |
committer | Pavlin Radoslavov <pavlin@google.com> | Thu Apr 14 17:49:45 2016 -0700 |
tree | e36e07790f1b485c91bb507c012e555b7b5bf588 | |
parent | 561367f319ea30bfb96b47fc2447ce398bcadb60 [diff] |
Add a missing null-pointer check in HeadsetService.stop() Bug: 27678483 Change-Id: I288b905d6b3f827a94365d512305cd29e186f3d4
diff --git a/android/app/src/com/android/bluetooth/hfp/HeadsetService.java b/android/app/src/com/android/bluetooth/hfp/HeadsetService.java index cda51fc..10bf23a 100755 --- a/android/app/src/com/android/bluetooth/hfp/HeadsetService.java +++ b/android/app/src/com/android/bluetooth/hfp/HeadsetService.java
@@ -78,7 +78,9 @@ } catch (Exception e) { Log.w(TAG,"Unable to unregister headset receiver",e); } - mStateMachine.doQuit(); + if (mStateMachine != null) { + mStateMachine.doQuit(); + } return true; }