From 7cae41916496cd56bad7eebc3dac3f4c159d7734 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Mon, 8 Oct 2018 15:39:37 +0800 Subject: binding: bluetooth: add check to be sure GError has been set segfaults can happen if the dbus call reply fails but doesn't set a GError. Bug-AGL: SPEC-1630 Change-Id: I83ea2f7997a8fcef1cdd73a7df2cf9ad97e00d91 Signed-off-by: Matt Ranostay --- binding/bluetooth-api.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'binding/bluetooth-api.h') diff --git a/binding/bluetooth-api.h b/binding/bluetooth-api.h index d8df0af..8ab8135 100644 --- a/binding/bluetooth-api.h +++ b/binding/bluetooth-api.h @@ -49,6 +49,9 @@ __tpath; \ }) +#define BLUEZ_ERRMSG(error) \ + (error ? error->message : "unspecified") + #define FREEDESKTOP_INTROSPECT "org.freedesktop.DBus.Introspectable" #define FREEDESKTOP_PROPERTIES "org.freedesktop.DBus.Properties" #define FREEDESKTOP_OBJECTMANAGER "org.freedesktop.DBus.ObjectManager" -- cgit 1.2.3-korg