global: avoid recursive destroy calls

Fixes #4250
This commit is contained in:
Wim Taymans 2024-09-04 18:05:29 +02:00
parent b2ce24e20e
commit 22bdd52db5

View file

@ -390,6 +390,9 @@ void pw_global_destroy(struct pw_global *global)
struct pw_resource *resource; struct pw_resource *resource;
struct pw_context *context = global->context; struct pw_context *context = global->context;
if (global->destroyed)
return;
global->destroyed = true; global->destroyed = true;
pw_log_debug("%p: destroy %u", global, global->id); pw_log_debug("%p: destroy %u", global, global->id);