From 49cf7c2f63f7b5824c04746447d5ee8a454f74de Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 5 Jun 2013 13:52:45 +0700 Subject: [PATCH] AVRCP: Fix crash if player status is NULL Assume status is 'stopped' in case the status is NULL. --- profiles/audio/avrcp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index c546283fb..86939e4d7 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -1229,6 +1229,8 @@ static uint8_t player_get_status(struct avrcp_player *player) return AVRCP_PLAY_STATUS_STOPPED; value = player->cb->get_status(player->user_data); + if (value == NULL) + return AVRCP_PLAY_STATUS_STOPPED; return play_status_to_val(value); } -- 2.47.3