From 736ea3a1699bac3945cdb9f56747b53e0bcca5c6 Mon Sep 17 00:00:00 2001 From: Matthew Einhorn Date: Mon, 9 Jan 2017 22:03:56 -0500 Subject: [PATCH] Decalre variables when fps is zero. --- kivy/clock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kivy/clock.py b/kivy/clock.py index f2b119de7..64310fcff 100644 --- a/kivy/clock.py +++ b/kivy/clock.py @@ -739,15 +739,15 @@ class ClockBaseFreeInterruptOnly( def idle(self): fps = self._max_fps + current = self.time() + event = self._event if fps > 0: - event = self._event min_sleep = self.get_resolution() usleep = self.usleep undershoot = 4 / 5. * min_sleep min_t = self.get_min_free_timeout interupt_next_only = self.interupt_next_only - current = self.time() sleeptime = 1 / fps - (current - self._last_tick) while sleeptime - undershoot > min_sleep: if event.is_set():