diff --git a/src/controller/mainController.py b/src/controller/mainController.py index 8b6fa11c..211ecac9 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -931,8 +931,8 @@ class Controller(object): self.view.insert_buffer(buffer.buffer, name=_(u"Trending topics for %s") % (trends.get_string()), pos=pos) self.buffers.append(buffer) buffer.start_stream() - timer = RepeatingTimer(300, buffer.start_stream) - timer.start() + buffer.timer = RepeatingTimer(300, buffer.start_stream) + buffer.timer.start() buffer.session.settings["other_buffers"]["trending_topic_buffers"].append(woeid) buffer.session.settings.write() @@ -987,9 +987,10 @@ class Controller(object): buff = self.view.search(buffer.name, buffer.account) answer = buffer.remove_buffer() if answer == False: return - if hasattr(buff, "timer"): + log.debug("destroying buffer...") + if hasattr(buffer, "timer"): log.debug("Stopping timer...") - buff.timer.cancel() + buffer.timer.cancel() log.debug("Timer cancelled.") self.right() self.view.delete_buffer(buff)