From 8ee53da5615ff69c7920d111f87730c9ae0a5d23 Mon Sep 17 00:00:00 2001 From: Jaikumar Ganesh Date: Tue, 6 Sep 2011 16:45:52 -0700 Subject: [PATCH] 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 --- core/java/android/server/BluetoothHealthProfileHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/server/BluetoothHealthProfileHandler.java b/core/java/android/server/BluetoothHealthProfileHandler.java index 8656cd97c5734..a6ada2bf3548e 100644 --- a/core/java/android/server/BluetoothHealthProfileHandler.java +++ b/core/java/android/server/BluetoothHealthProfileHandler.java @@ -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; }