From 58479906d8e38b543e60f8f07ccaa1b2b9b43166 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