From 69ab170c1921185d5cdeaba4bf7a9f7197a37b33 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 22 May 2014 08:30:26 +0530 Subject: [PATCH] Fix a regression that broke the compare books tool when used outside the book editor. Fixes #1321975 [Unhandled exception when comparing epub books](https://bugs.launchpad.net/calibre/+bug/1321975) --- src/calibre/gui2/tweak_book/editor/syntax/html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/tweak_book/editor/syntax/html.py b/src/calibre/gui2/tweak_book/editor/syntax/html.py index e117943e88..79d80a85ef 100644 --- a/src/calibre/gui2/tweak_book/editor/syntax/html.py +++ b/src/calibre/gui2/tweak_book/editor/syntax/html.py @@ -239,7 +239,7 @@ def process_text(state, text, nbsp_format, spell_format, user_data): if not ans: ans = [(len(text), fmt)] - if tprefs['inline_spell_check'] and state.tags and user_data.tag_ok_for_spell(state.tags[-1].name): + if tprefs['inline_spell_check'] and state.tags and user_data.tag_ok_for_spell(state.tags[-1].name) and hasattr(dictionaries, 'active_user_dictionaries'): split_ans = [] locale = state.current_lang or dictionaries.default_locale sfmt = SyntaxTextCharFormat(spell_format)