Skip to content

Commit b734487

Browse files
Thalleycarlescufi
authored andcommitted
Bluetooth: Audio: Add conn check for MCC notify handler
Add a NULL check for the conn pointer. Signed-off-by: Emil Gydesen <[email protected]>
1 parent 5dfea31 commit b734487

File tree

1 file changed

+4
-0
lines changed
  • subsys/bluetooth/audio

1 file changed

+4
-0
lines changed

subsys/bluetooth/audio/mcc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,10 @@ static uint8_t mcs_notify_handler(struct bt_conn *conn,
911911
{
912912
uint16_t handle = params->value_handle;
913913

914+
if (conn == NULL) {
915+
return BT_GATT_ITER_CONTINUE;
916+
}
917+
914918
BT_DBG("Notification, handle: %d", handle);
915919

916920
if (data) {

0 commit comments

Comments
 (0)