From 085532b9b31837bdd7d028c1e65bf428807d27bb Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sat, 11 Mar 2006 03:41:03 +0000 Subject: Check for non-existing passcode agent --- hcid/dbus-security.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hcid/dbus-security.c b/hcid/dbus-security.c index a0230f77..bbc82871 100644 --- a/hcid/dbus-security.c +++ b/hcid/dbus-security.c @@ -236,7 +236,12 @@ static int call_passkey_agent(struct passkey_agent *agent, int dev, const char * ba2str(sba, bda); - debug("Creating method call: name=%s, path=%s", agent->name, + if (!agent) { + debug("call_passkey_agent(): no agent registered"); + goto failed; + } + + debug("Calling PasskeyAgent.Request: name=%s, path=%s", agent->name, agent->path); message = dbus_message_new_method_call(agent->name, agent->path, -- cgit