From cb203e38c33b389a5bb67a6e67d235af76740945 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 18 Nov 2020 17:19:17 +0100 Subject: [PATCH] pulse-server: make sure active_profile_name is not NULL Fixes #390 --- src/modules/module-protocol-pulse/collect.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/module-protocol-pulse/collect.c b/src/modules/module-protocol-pulse/collect.c index ccca953f8..714e32dda 100644 --- a/src/modules/module-protocol-pulse/collect.c +++ b/src/modules/module-protocol-pulse/collect.c @@ -278,6 +278,10 @@ static uint32_t collect_profile_info(struct pw_manager_object *card, struct card } n++; } + if (card_info->active_profile_name == NULL && n > 0) + card_info->active_profile_name = profile_info[0].name; + if (card_info->active_profile_name == NULL) + card_info->active_profile_name = "invalid"; return n; }