Diff between 32da6e18ea36aeb01b9f82d74689fb1e061f3313 and d393274dded3f54394caa13f7ce27b2adbf8683f

Changed Files

File Additions Deletions Status
src/shared/gatt-helpers.c +3 -0 modified

Full Patch

diff --git a/src/shared/gatt-helpers.c b/src/shared/gatt-helpers.c
index d0bee3f..dc4a8e8 100644
--- a/src/shared/gatt-helpers.c
+++ b/src/shared/gatt-helpers.c
@@ -588,6 +588,9 @@ static void put_uuid_le(const bt_uuid_t *src, void *dst)
 
 static inline int get_uuid_len(const bt_uuid_t *uuid)
 {
+	if (!uuid)
+		return 0;
+
 	return (uuid->type == BT_UUID16) ? 2 : 16;
 }