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

Commit 207ef55c authored by Roman Birg's avatar Roman Birg
Browse files

Bluetooth: fix potential NPE



Change-Id: I807f38df94a1e7ccf0622f8d8ec86a9518de9dc6
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent 0256ad87
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -399,10 +399,14 @@ public class BluetoothOppService extends Service {
        mOppManager.isOPPServiceUp = false;
        getContentResolver().unregisterContentObserver(mObserver);
        unregisterReceiver(mBluetoothReceiver);
        if (mSocketListener != null) {
            mSocketListener.stop();
        mL2cSocketListener.stop();
            mSocketListener = null;
        }
        if (mL2cSocketListener != null) {
            mL2cSocketListener.stop();
            mL2cSocketListener = null;
        }

        if(mBatchs != null) {
            mBatchs.clear();