Fix a bug where a null field would cause an exception.

This commit is contained in:
Raoul Snyman 2010-11-16 19:12:11 +02:00
parent fabf12ad70
commit aadc913ba1
1 changed files with 4 additions and 0 deletions

View File

@ -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)