From 67347e67b6c885866444742b7bb77167cd70c178 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 24 Sep 2007 06:44:20 +0000 Subject: [PATCH] Stop update timer before shutting down. --- deluge/ui/gtkui/mainwindow.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deluge/ui/gtkui/mainwindow.py b/deluge/ui/gtkui/mainwindow.py index 545c65f1c..671708529 100644 --- a/deluge/ui/gtkui/mainwindow.py +++ b/deluge/ui/gtkui/mainwindow.py @@ -83,7 +83,7 @@ class MainWindow: def start(self): """Start the update thread and show the window""" - gobject.timeout_add(1000, self.update) + self.update_timer = gobject.timeout_add(1000, self.update) self.show() def update(self): @@ -113,6 +113,8 @@ class MainWindow: return self.window.get_property("visible") def quit(self): + # Stop the update timer from running + gobject.source_remove(self.update_timer) del self.menubar del self.toolbar del self.torrentview