From b9b688efc5beec0c98d7719e74096361363aec9f Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Sat, 11 Mar 2017 18:38:56 +0100 Subject: [PATCH] During shutdown, the gui attempts to update itself if a library closed plugin updates columns. This happens because the gui thinks the database is still open when the windows are being hidden. --- src/calibre/gui2/ui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/ui.py b/src/calibre/gui2/ui.py index 06dea6bbb8..f3d4d03d87 100644 --- a/src/calibre/gui2/ui.py +++ b/src/calibre/gui2/ui.py @@ -956,7 +956,7 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{ mb.stop() if db is not None: - db.close() + self.library_view.model().close() try: try: