Fix shutdown code

This commit is contained in:
Charles Haley 2010-09-06 19:01:07 +01:00
parent 28f62fd4dd
commit f7321f2c57

View File

@ -522,7 +522,13 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, # {{{
def shutdown(self, write_settings=True):
self.db.clean()
l = getattr(self, 'library_view', None)
if l:
l = getattr(l, 'model', None);
if l:
l = l().db
if l:
l.clean()
for action in self.iactions.values():
if not action.shutting_down():
return