From 88f9506f42ceea1efb10b39c6854c9ad28f92710 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 5 May 2018 20:19:34 +0200 Subject: dispatch: add an assert() --- misc/dispatch.c | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/dispatch.c b/misc/dispatch.c index 428fd9b4f0..1102c564ae 100644 --- a/misc/dispatch.c +++ b/misc/dispatch.c @@ -274,6 +274,7 @@ void mp_dispatch_queue_process(struct mp_dispatch_queue *queue, double timeout) // while the dispatch item is processed. // At the same time, we must prevent other threads from returning // from mp_dispatch_lock(), which is done by locked=true. + assert(!queue->locked); queue->locked = true; pthread_mutex_unlock(&queue->lock); -- cgit v1.2.3