forked from openlp/openlp
Fixes 1011286 Song Editor -> Edit All Crashes with out valid verse splitter
Fixes: https://launchpad.net/bugs/1011286
This commit is contained in:
parent
f1afae1813
commit
b1c27d98a4
@ -189,8 +189,14 @@ class EditVerseForm(QtGui.QDialog, Ui_EditVerseDialog):
|
|||||||
if self.hasSingleVerse:
|
if self.hasSingleVerse:
|
||||||
value = unicode(self.getVerse()[0])
|
value = unicode(self.getVerse()[0])
|
||||||
else:
|
else:
|
||||||
log.debug(unicode(self.getVerse()[0]).split(u'\n'))
|
lines = unicode(self.getVerse()[0]).split(u'\n')
|
||||||
value = unicode(self.getVerse()[0]).split(u'\n')[1]
|
log.debug(lines)
|
||||||
|
if len(lines) <= 1:
|
||||||
|
critical_error_message_box(
|
||||||
|
message=translate('SongsPlugin.EditSongForm',
|
||||||
|
'Invalid entry, you need a verse splitter and some text.'))
|
||||||
|
return False
|
||||||
|
value = lines[1]
|
||||||
if not value:
|
if not value:
|
||||||
lines = unicode(self.getVerse()[0]).split(u'\n')
|
lines = unicode(self.getVerse()[0]).split(u'\n')
|
||||||
index = 2
|
index = 2
|
||||||
|
Loading…
Reference in New Issue
Block a user