summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-08-27 19:39:40 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-08-27 19:39:40 +0200
commite1f075069418073579261d752c8cee5552ee2655 (patch)
tree0e8270c9eadd4289726a5d54672f3e7d7d2e7591
parent8e0f32408df6b817128d61eae264d8a5b38d7929 (diff)
Check that a device is available
-rw-r--r--src/dbus-hci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dbus-hci.c b/src/dbus-hci.c
index 44c56bbf..b713b16f 100644
--- a/src/dbus-hci.c
+++ b/src/dbus-hci.c
@@ -1832,8 +1832,8 @@ int hcid_dbus_get_io_cap(bdaddr_t *local, bdaddr_t *remote,
if (!agent) {
/* No agent available, and no bonding case */
- if (device_get_auth(device) == 0x00 ||
- device_get_auth(device) == 0x01) {
+ if (device && (device_get_auth(device) == 0x00 ||
+ device_get_auth(device) == 0x01)) {
/* No input, no output */
*cap = 0x03;
return 0;