Fix #1401357 [Harmless error when merging files in the editor](https://bugs.launchpad.net/calibre/+bug/1401357)

This commit is contained in:
Kovid Goyal 2014-12-11 08:32:20 +05:30
parent a82cf81975
commit 4d7b2a379a

View File

@ -281,7 +281,7 @@ class TextEdit(PlainTextEdit):
sel.append(self.current_cursor_line)
if self.current_search_mark is not None:
sel.append(self.current_search_mark)
if instant and not self.highlighter.has_requests:
if instant and not self.highlighter.has_requests and self.smarts is not None:
sel.extend(self.smarts.get_extra_selections(self))
self.smart_highlighting_updated.emit()
else: