| Index: device/bluetooth/bluetooth_low_energy_device_mac.mm
|
| diff --git a/device/bluetooth/bluetooth_low_energy_device_mac.mm b/device/bluetooth/bluetooth_low_energy_device_mac.mm
|
| index dd93a2abce3104ef4673c3279cfd2ea3547412e2..41dcd06bdf94758afbbda13cea215b58c3984104 100644
|
| --- a/device/bluetooth/bluetooth_low_energy_device_mac.mm
|
| +++ b/device/bluetooth/bluetooth_low_energy_device_mac.mm
|
| @@ -490,15 +490,13 @@ BluetoothLowEnergyDeviceMac::GetBluetoothRemoteGattCharacteristicMac(
|
| BluetoothRemoteGattDescriptorMac*
|
| BluetoothLowEnergyDeviceMac::GetBluetoothRemoteGattDescriptorMac(
|
| CBDescriptor* cb_descriptor) const {
|
| - CBCharacteristic* cb_characteristic = cb_descriptor.characteristic;
|
| - BluetoothRemoteGattServiceMac* gatt_service =
|
| - GetBluetoothRemoteGattServiceMac(cb_characteristic.service);
|
| - DCHECK(gatt_service);
|
| - BluetoothRemoteGattCharacteristicMac* gatt_characteristic =
|
| - gatt_service->GetBluetoothRemoteGattCharacteristicMac(cb_characteristic);
|
| - DCHECK(gatt_characteristic);
|
| - return gatt_characteristic->GetBluetoothRemoteGattDescriptorMac(
|
| - cb_descriptor);
|
| + CBService* cb_service = [[cb_descriptor characteristic] service];
|
| + BluetoothRemoteGattServiceMac* gatt_service_mac =
|
| + GetBluetoothRemoteGattServiceMac(cb_service);
|
| + if (!gatt_service_mac) {
|
| + return nullptr;
|
| + }
|
| + return gatt_service_mac->GetBluetoothRemoteGattDescriptorMac(cb_descriptor);
|
| }
|
|
|
| void BluetoothLowEnergyDeviceMac::DidDisconnectPeripheral(NSError* error) {
|
|
|