summaryrefslogtreecommitdiffstats
path: root/src/bluetoothsettings/bluez/bluetoothdevice_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluetoothsettings/bluez/bluetoothdevice_p.cpp')
-rw-r--r--src/bluetoothsettings/bluez/bluetoothdevice_p.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bluetoothsettings/bluez/bluetoothdevice_p.cpp b/src/bluetoothsettings/bluez/bluetoothdevice_p.cpp
index 28ed605..4705ac4 100644
--- a/src/bluetoothsettings/bluez/bluetoothdevice_p.cpp
+++ b/src/bluetoothsettings/bluez/bluetoothdevice_p.cpp
@@ -67,6 +67,9 @@ bool BluetoothDevicePrivate::powered() const
void BluetoothDevicePrivate::setPowered(const bool& aPowered)
{
+ if (!m_localDevice)
+ return;
+
if (aPowered) {
m_localDevice->powerOn();
}