From 5a4ca12432a011280ff4cb86e5c905380cf30abd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 14 Jun 2019 08:40:20 +0530 Subject: [PATCH] Fix #1832780 [Error when changing libraries](https://bugs.launchpad.net/calibre/+bug/1832780) --- src/calibre/gui2/bars.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/calibre/gui2/bars.py b/src/calibre/gui2/bars.py index c891ab29c8..7d62a358b6 100644 --- a/src/calibre/gui2/bars.py +++ b/src/calibre/gui2/bars.py @@ -390,7 +390,11 @@ if isosx: self.clone_menu() def about_to_show(self): + if sip.isdeleted(self.clone): + return cm = self.clone.menu() + if cm is None: + return before = list(QMenu.actions(cm)) cm.aboutToShow.emit() after = list(QMenu.actions(cm))