From 94f36ac4f2245fa861181bcb139a886b425eba1c Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 22 Jan 2009 02:36:45 +0900 Subject: [PATCH] don't try to update if deck is currently closed (such as on sync) --- ankiqt/ui/status.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ankiqt/ui/status.py b/ankiqt/ui/status.py index 40cb38c0a..9b67afe88 100644 --- a/ankiqt/ui/status.py +++ b/ankiqt/ui/status.py @@ -264,6 +264,8 @@ You should aim to answer each question within
self.timerFlashStart = time.time() def updateCount(self): + if not self.main.deck: + return if self.state in ("showQuestion", "showAnswer"): self.main.deck.checkDue() self.redraw()