summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-05-05 20:19:34 +0200
committersfan5 <sfan5@live.de>2018-05-25 10:45:07 +0200
commit58479906d8e38b543e60f8f07ccaa1b2b9b43166 (patch)
tree5efa4d86fc8a530918ceb1dbf5fb7d44b4431e68
parentfae9d7744c973ca3e39ff4bad0fda886b6a850b1 (diff)
downloadmpv-58479906d8e38b543e60f8f07ccaa1b2b9b43166.tar.bz2
mpv-58479906d8e38b543e60f8f07ccaa1b2b9b43166.tar.xz
dispatch: add an assert()
-rw-r--r--misc/dispatch.c1
1 files changed, 1 insertions, 0 deletions
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);