summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-05-05 20:19:34 +0200
committerwm4 <wm4@nowhere>2018-05-24 19:56:33 +0200
commit88f9506f42ceea1efb10b39c6854c9ad28f92710 (patch)
tree77def17527b677971fbe67883576e3af0383f82e /misc
parent95ab93d9f15f84271732bc785a72db846d2933dc (diff)
downloadmpv-88f9506f42ceea1efb10b39c6854c9ad28f92710.tar.bz2
mpv-88f9506f42ceea1efb10b39c6854c9ad28f92710.tar.xz
dispatch: add an assert()
Diffstat (limited to 'misc')
-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);