diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/device.c | 11 | 
1 files changed, 7 insertions, 4 deletions
| diff --git a/src/device.c b/src/device.c index 00589006..59e48904 100644 --- a/src/device.c +++ b/src/device.c @@ -1172,13 +1172,16 @@ int device_browse(struct btd_device *device, DBusConnection *conn,  	}  	device->discov_active = 1; -	device->discov_requestor = g_strdup(dbus_message_get_sender(msg)); -	/* Track the request owner to cancel it -	 * automatically if the owner exits */ -	device->discov_listener = g_dbus_add_disconnect_watch(conn, + +	if (msg) { +		device->discov_requestor = g_strdup(dbus_message_get_sender(msg)); +		/* Track the request owner to cancel it +		 * automatically if the owner exits */ +		device->discov_listener = g_dbus_add_disconnect_watch(conn,  						dbus_message_get_sender(msg),  						discover_services_req_exit,  						device, NULL); +	}  	return bt_search_service(&src, &device->bdaddr,  					&uuid, cb, req, NULL); | 
