summaryrefslogtreecommitdiffstats
path: root/packages/SettingsLib
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SettingsLib')
-rwxr-xr-xpackages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
index bf92fda..4bcbea7 100755
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
@@ -355,7 +355,9 @@ public final class BluetoothEventManager {
return;
}
int errorMsg = R.string.bluetooth_pairing_error_message;
- Utils.showError(context, cachedDevice.getName(), errorMsg);
+ if (context != null && cachedDevice != null) {
+ Utils.showError(context, cachedDevice.getName(), errorMsg);
+ }
}
}