From 3e0671ba17b3e10d18b6d10a0bc1d31e151a27e5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 20 Aug 2018 11:47:54 +0530 Subject: [PATCH] Fix a crash when using some third party plugins and enabling the "two lines for text under icons" option Fixes #1787700 [Calibre closes after remove toolbar actions](https://bugs.launchpad.net/calibre/+bug/1787700) --- src/calibre/gui2/bars.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/bars.py b/src/calibre/gui2/bars.py index 8b14d37bf4..cb1b039278 100644 --- a/src/calibre/gui2/bars.py +++ b/src/calibre/gui2/bars.py @@ -99,7 +99,7 @@ def wrap_button_text(text, max_len=MAX_TEXT_LENGTH): def rewrap_button(w): - if not sip.isdeleted(w): + if not sip.isdeleted(w) and w.defaultAction() is not None: w.setText(wrap_button_text(w.defaultAction().text()))