From 9d892a2addd155188e7942172a1fb1bdbf252d02 Mon Sep 17 00:00:00 2001 From: Bruna Moreira Date: Mon, 2 Apr 2012 16:05:22 -0400 Subject: [PATCH] adapter: Fix segfault when icon is uninitialized If device type is LE and GAP Appearance characteristic does not exist, the icon will not be initialized. --- src/adapter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/adapter.c b/src/adapter.c index f8f46f861..6afeaadef 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -2710,6 +2710,8 @@ void adapter_emit_device_found(struct btd_adapter *adapter, if (read_remote_appearance(&adapter->bdaddr, &dev->bdaddr, &app) == 0) icon = gap_appearance_to_icon(app); + else + icon = NULL; emit_device_found(adapter->path, paddr, "Address", DBUS_TYPE_STRING, &paddr, -- 2.47.3