From aadc913ba19a4d2eb1c3813483aea864eda9abc6 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Tue, 16 Nov 2010 19:12:11 +0200 Subject: [PATCH] Fix a bug where a null field would cause an exception. --- openlp/plugins/songs/songsplugin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openlp/plugins/songs/songsplugin.py b/openlp/plugins/songs/songsplugin.py index 87a652f71..338179037 100644 --- a/openlp/plugins/songs/songsplugin.py +++ b/openlp/plugins/songs/songsplugin.py @@ -145,6 +145,10 @@ class SongsPlugin(Plugin): counter = 0 for song in songs: counter += 1 + if song.title is None: + song.title = u'' + if song.alternate_title is None: + song.alternate_title = u'' song.search_title = self.whitespace.sub(u' ', song.title.lower()) +\ u' ' + self.whitespace.sub(u' ', song.alternate_title.lower()) progressDialog.setValue(counter)