mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
race condition in sound code
This commit is contained in:
parent
7d3698e2c7
commit
cebcce4a34
1 changed files with 5 additions and 1 deletions
|
@ -97,7 +97,11 @@ class MplayerMonitor(threading.Thread):
|
|||
if not self.mplayer:
|
||||
self.startProcess()
|
||||
# pop a file
|
||||
item = mplayerQueue.pop(0)
|
||||
try:
|
||||
item = mplayerQueue.pop(0)
|
||||
except IndexError:
|
||||
# queue was cleared by main thread
|
||||
continue
|
||||
if mplayerClear:
|
||||
mplayerClear = False
|
||||
extra = ""
|
||||
|
|
Loading…
Reference in a new issue