diff --git a/src/calibre/gui2/library.py b/src/calibre/gui2/library.py index 728c835e11..c3134de917 100644 --- a/src/calibre/gui2/library.py +++ b/src/calibre/gui2/library.py @@ -240,6 +240,8 @@ class BooksModel(QAbstractTableModel): self.count_changed() def clean_search_text(self, text): + if not text: + return text tokens = text.split(' ') for i, token in enumerate(tokens): if token.strip().endswith(':') or token.strip() == '':