From 04c719e8073d3e480c1fd9ed316e1f243d518fff Mon Sep 17 00:00:00 2001 From: Philip Ridout Date: Sat, 18 Feb 2017 08:21:19 +0000 Subject: [PATCH] Dont try to display search results if there are none! --- openlp/plugins/bibles/lib/mediaitem.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index cc28c93d1..8813e79bc 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -732,10 +732,11 @@ class BibleMediaItem(MediaManagerItem): :return: None """ self.list_view.clear() - items = self.build_display_results(self.bible, self.second_bible, self.search_results) - for item in items: - self.list_view.addItem(item) - self.list_view.selectAll() + if self.search_results: + items = self.build_display_results(self.bible, self.second_bible, self.search_results) + for item in items: + self.list_view.addItem(item) + self.list_view.selectAll() self.search_results = [] self.second_search_results = []