Fixes #119: Distraction free mode crashes with time target

This commit is contained in:
Olivier Keshavjee 2017-06-20 14:08:48 +02:00
parent fb9eb479f8
commit 35bb0f7cfe

View file

@ -79,7 +79,7 @@ class locker(QWidget, Ui_locker):
self._words = wc self._words = wc
if self.isLocked(): if self.isLocked():
self.updateBtnText() self.updateBtnText()
if self._words >= self._target: if self._target and self._words >= self._target:
self.unlock() self.unlock()
def updateBtnText(self): def updateBtnText(self):