global: avoid recursive destroy calls

Fixes #4250
This commit is contained in:
Wim Taymans 2024-09-04 18:05:29 +02:00
parent f9eed5843c
commit 0377a3797a

View file

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