mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -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:
|
if not self.mplayer:
|
||||||
self.startProcess()
|
self.startProcess()
|
||||||
# pop a file
|
# pop a file
|
||||||
item = mplayerQueue.pop(0)
|
try:
|
||||||
|
item = mplayerQueue.pop(0)
|
||||||
|
except IndexError:
|
||||||
|
# queue was cleared by main thread
|
||||||
|
continue
|
||||||
if mplayerClear:
|
if mplayerClear:
|
||||||
mplayerClear = False
|
mplayerClear = False
|
||||||
extra = ""
|
extra = ""
|
||||||
|
|
Loading…
Reference in a new issue