From e1f075069418073579261d752c8cee5552ee2655 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 27 Aug 2008 19:39:40 +0200 Subject: Check that a device is available --- src/dbus-hci.c | 4 ++-- 1 file 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; -- cgit