From 0a9ddcda0c29d94929469d1797f6659471f787ef Mon Sep 17 00:00:00 2001 From: John Schember Date: Sun, 28 Jun 2009 17:59:33 -0400 Subject: [PATCH] Prevent exception with search text. --- src/calibre/gui2/library.py | 2 ++ 1 file changed, 2 insertions(+) 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() == '':