Message ID | 20240710113151.49296-3-r.smirnov@omp.ru |
---|---|
State | Superseded |
Headers | show |
Series | fix errors found by SVACE static analyzer #1 | expand |
diff --git a/src/shared/vcp.c b/src/shared/vcp.c index 602d46dc1..43ef1d186 100644 --- a/src/shared/vcp.c +++ b/src/shared/vcp.c @@ -2729,6 +2729,9 @@ static void foreach_aics_service(struct gatt_db_attribute *attr, struct bt_vcp *vcp = user_data; struct bt_aics *aics = vcp_get_aics(vcp); + if (!aics || !attr) + return; + aics->service = attr; gatt_db_service_set_claimed(attr, true);