forked from openlp/openlp
Prevent possible crash, if label field is empty in database.
This commit is contained in:
parent
78c539e1d8
commit
1ce88e7a2a
@ -269,6 +269,8 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||
if index is None:
|
||||
index = VerseType.Other
|
||||
verse[0][u'type'] = VerseType.Tags[index]
|
||||
if verse[0][u'label'] == u'':
|
||||
verse[0][u'label'] = u'1'
|
||||
verse_def = u'%s%s' % (verse[0][u'type'], verse[0][u'label'])
|
||||
item = QtGui.QTableWidgetItem(verse[1])
|
||||
item.setData(QtCore.Qt.UserRole, QtCore.QVariant(verse_def))
|
||||
|
Loading…
Reference in New Issue
Block a user