Diff between ee46e92bdef44e85cf4d6b10e08d56a2aa7706be and 176cf2e12a289f9f94666e188c79fa6cc1ff249b
Changed Files
| File | Additions | Deletions | Status |
| src/shared/vcp.c | +3 | -0 | modified |
Full Patch
diff --git a/src/shared/vcp.c b/src/shared/vcp.c
index b7e17e4..06264a2 100644
--- a/src/shared/vcp.c
+++ b/src/shared/vcp.c
@@ -2701,6 +2701,9 @@ static void foreach_vocs_service(struct gatt_db_attribute *attr,
struct bt_vcp *vcp = user_data;
struct bt_vocs *vocs = vcp_get_vocs(vcp);
+ if (!vocs || !attr)
+ return;
+
vocs->service = attr;
gatt_db_service_set_claimed(attr, true);