Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43c2d83c authored by Ashwini Munigala's avatar Ashwini Munigala Committed by Gerrit - the friendly Code Review server
Browse files

MAP: Handle possible NPE while disconnect map.

Fix possible  null pointer exception while last
MAS instance disconnect is handled before MNS
unregistration.

Change-Id: I4e72038a5ddc6c3ac8c515def57cb4f98fe87675
CRs-Fixed: 930811
parent 09df9d1e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -407,7 +407,7 @@ public class BluetoothMapService extends ProfileService {
                    if (DEBUG) Log.d(TAG,"ContentObserver Registration MASID: " + msg.arg1
                        + " Enable: " + msg.arg2);
                    BluetoothMapMasInstance masInst = mMasInstances.get(msg.arg1);
                    if (masInst != null) {
                    if (masInst != null && masInst.mObserver != null) {
                        try {
                            if (msg.arg2 == BluetoothMapAppParams.NOTIFICATION_STATUS_YES) {
                                masInst.mObserver.registerObserver();