From d6dfa93b4024028747a5ede8f0231e859f342546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Sun, 6 Mar 2022 14:56:29 +0100 Subject: [PATCH] spa: support: loop: assert source's loop when dispatching --- spa/plugins/support/loop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spa/plugins/support/loop.c b/spa/plugins/support/loop.c index ef52c32bf..c1d1494cb 100644 --- a/spa/plugins/support/loop.c +++ b/spa/plugins/support/loop.c @@ -387,6 +387,9 @@ static int loop_iterate(void *object, int timeout) * can then reset the rmask to suppress the callback */ for (i = 0; i < nfds; i++) { struct spa_source *s = ep[i].data; + + spa_assert(s->loop == &impl->loop); + s->rmask = ep[i].events; /* already active in another iteration of the loop, * remove it from that iteration */