From cc235a8d528b36cad2cf9fe6517d54711613331a Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 1 Apr 2016 11:07:15 +0300 Subject: [PATCH] audio/avrcp: Fix registering to player events If controller does not have a player skip registering to events which requires a player. --- profiles/audio/avrcp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index 0c6279a20..37bc29137 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -3647,8 +3647,9 @@ static gboolean avrcp_get_capabilities_resp(struct avctp *conn, case AVRCP_EVENT_ADDRESSED_PLAYER_CHANGED: case AVRCP_EVENT_UIDS_CHANGED: case AVRCP_EVENT_AVAILABLE_PLAYERS_CHANGED: - /* These events above are controller specific */ - if (!session->controller) + /* These events above requires a player */ + if (!session->controller || + !session->controller->player) break; case AVRCP_EVENT_VOLUME_CHANGED: avrcp_register_notification(session, event); -- 2.47.3