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

Commit 8ee53da5 authored by Jaikumar Ganesh's avatar Jaikumar Ganesh
Browse files

Fix crash while connecting channel.

When an incoming connection comes and then we disconnect it,
and then launch the outgoing connection - we crash because
the channel path chan.mChannelPath is null.

Change-Id: I9115cc038f7ce85a193bf05d14b2b0a5e0579a69
parent eb9d3463
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -294,7 +294,7 @@ final class BluetoothHealthProfileHandler {

    private HealthChannel findChannelByPath(BluetoothDevice device, String path) {
        for (HealthChannel chan : mHealthChannels) {
            if (chan.mChannelPath.equals(path) && chan.mDevice.equals(device)) return chan;
            if (path.equals(chan.mChannelPath) && device.equals(chan.mDevice)) return chan;
        }
        return null;
    }