From a92d060de927d3a7e2aabc669d3c159e4d466005 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 18 Aug 2020 12:11:54 +0200 Subject: [PATCH] context: make sure required fields are not NULL --- pipewire-pulseaudio/src/context.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pipewire-pulseaudio/src/context.c b/pipewire-pulseaudio/src/context.c index 67bfeaff6..23c7124dc 100644 --- a/pipewire-pulseaudio/src/context.c +++ b/pipewire-pulseaudio/src/context.c @@ -406,6 +406,8 @@ static void device_event_info(void *object, const struct pw_device_info *info) } } } + if (i->driver == NULL) + i->driver = "PipeWire"; global_sync(g); } @@ -973,6 +975,10 @@ static void client_event_info(void *object, const struct pw_client_info *info) i->driver = info->props ? spa_dict_lookup(info->props, PW_KEY_PROTOCOL) : NULL; } + if (i->name == NULL) + i->name = "Unknown"; + if (i->driver == NULL) + i->name = "PipeWire"; global_sync(g); }