summaryrefslogtreecommitdiff
path: root/pipewire-pulseaudio
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2020-08-18 12:11:54 +0200
committerWim Taymans <wtaymans@redhat.com>2020-08-18 12:11:54 +0200
commita92d060de927d3a7e2aabc669d3c159e4d466005 (patch)
tree6649b129fd5496e0699b9fe0fdba3de536a77fe9 /pipewire-pulseaudio
parent35bec2c7c4217aedf73ba38a8a8dd6578972442e (diff)
context: make sure required fields are not NULL
Diffstat (limited to 'pipewire-pulseaudio')
-rw-r--r--pipewire-pulseaudio/src/context.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pipewire-pulseaudio/src/context.c b/pipewire-pulseaudio/src/context.c
index 67bfeaff..23c7124d 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);
}