From a4d1c55d4fdfbba797992bf350f4fcb5c0becb1c Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 23 Jun 2009 06:29:52 +0900 Subject: [PATCH] if mplayerCond is none, finish thread --- anki/sound.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/anki/sound.py b/anki/sound.py index f1cc1a972..c167585bf 100644 --- a/anki/sound.py +++ b/anki/sound.py @@ -137,6 +137,8 @@ class MplayerMonitor(threading.Thread): while 1: mplayerCond.acquire() while not mplayerQueue: + if not mplayerCond: + return mplayerCond.wait() if not self.mplayer: self.startProcess()