| Index: device/bluetooth/bluez/bluetooth_adapter_bluez.cc
|
| diff --git a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
|
| index 5dd44416a7c794d914733e7bfbac7e29418aea5a..8ccf592003db5454dfcd83f6904b1b28bcfeea83 100644
|
| --- a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
|
| +++ b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
|
| @@ -208,9 +208,11 @@ BluetoothAdapterBlueZ::BluetoothAdapterBlueZ(const InitCallback& init_callback)
|
| }
|
|
|
| void BluetoothAdapterBlueZ::Init() {
|
| - // If the platform doesn't support Object Manager then Bluez 5 is probably
|
| - // not present. In this case we just return without initializing anything.
|
| - if (!bluez::BluezDBusManager::Get()->IsObjectManagerSupported()) {
|
| + // We may have been shutdown already, in which case do nothing. If the
|
| + // platform doesn't support Object Manager then Bluez 5 is probably not
|
| + // present. In this case we just return without initializing anything.
|
| + if (dbus_is_shutdown_ ||
|
| + !bluez::BluezDBusManager::Get()->IsObjectManagerSupported()) {
|
| initialized_ = true;
|
| init_callback_.Run();
|
| return;
|
|
|