thread-loop: we must be running to be in the thread

This commit is contained in:
Wim Taymans 2022-03-29 10:48:11 +02:00
parent 9849d12009
commit 90d755ab4c

View file

@ -465,5 +465,5 @@ void pw_thread_loop_accept(struct pw_thread_loop *loop)
SPA_EXPORT
bool pw_thread_loop_in_thread(struct pw_thread_loop *loop)
{
return pthread_self() == loop->thread;
return loop->running && pthread_self() == loop->thread;
}