pipewire: clear log first, then remove plugins

Reset the logger first before we unload the plugins or else we might
try to log after we unloaded the logger plugin and crash.
This commit is contained in:
Wim Taymans 2020-10-13 09:52:52 +02:00
parent 50d07be7fc
commit 969b7b6287

View file

@ -418,6 +418,7 @@ void pw_deinit(void)
struct registry *registry = &global_registry; struct registry *registry = &global_registry;
struct plugin *p; struct plugin *p;
pw_log_set(NULL);
spa_list_consume(p, &registry->plugins, link) { spa_list_consume(p, &registry->plugins, link) {
struct handle *h; struct handle *h;
p->ref++; p->ref++;
@ -427,7 +428,6 @@ void pw_deinit(void)
} }
if (support->categories) if (support->categories)
pw_free_strv(support->categories); pw_free_strv(support->categories);
pw_log_set(NULL);
spa_zero(global_support); spa_zero(global_support);
spa_zero(global_registry); spa_zero(global_registry);