From 4364aa411da27ea5991c42f7d08c4ebabffce6c4 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Thu, 29 Sep 2011 14:07:28 -0300 Subject: [PATCH] AVRCP: fix changed notification We sure want to send notifications only when section is not NULL. Otherwise we either crash or do not send the expected notification. --- audio/avrcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/avrcp.c b/audio/avrcp.c index ac9a1076a..e5b51db35 100644 --- a/audio/avrcp.c +++ b/audio/avrcp.c @@ -549,7 +549,7 @@ static int avrcp_send_event(struct media_player *mp, uint8_t id, void *data) uint16_t size; int err; - if (mp->session) + if (mp->session == NULL) return -ENOTCONN; if (!(mp->registered_events & (1 << id))) -- 2.47.3