summaryrefslogtreecommitdiffstats
path: root/binding/bluetooth-api.c
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2019-02-14 19:17:53 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2019-02-18 13:58:59 -0800
commitab5fa777a4a9ed7d10dcd6407b026d23828dffba (patch)
tree97d9f0580431f83e14ef5c9ed698ad868a7a6801 /binding/bluetooth-api.c
parent9372e137dfda598c389296a59e7e1f5fcbd9d85c (diff)
binding: bluetooth: fix segfault when no adapters are connectedflounder_6.0.5flounder/6.0.56.0.5flounder
Bug-AGL: SPEC-2047 Change-Id: I55a080af35dad1514ee0423eff80e65331891bc7 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding/bluetooth-api.c')
-rw-r--r--binding/bluetooth-api.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/binding/bluetooth-api.c b/binding/bluetooth-api.c
index 3f66033..98b60fe 100644
--- a/binding/bluetooth-api.c
+++ b/binding/bluetooth-api.c
@@ -290,6 +290,10 @@ static void bluez_devices_signal_callback(
g_variant_get(parameters, "(&oa{sa{sv}})", &path, &array);
+ // no adapter or device in path
+ if (!g_strcmp0(path, BLUEZ_PATH))
+ return;
+
jresp = json_object_new_object();
json_process_path(jresp, path);