forked from openlp/openlp
Make loading of variable slightly more bulletproof.
This commit is contained in:
parent
4f603d7353
commit
57d78d00df
@ -662,6 +662,9 @@ class SongImportForm(OpenLPWizard):
|
||||
try:
|
||||
last_import_type = int(QtCore.QSettings().value(
|
||||
u'songs/last import type').toString())
|
||||
if last_import_type >= self.formatComboBox.count() or \
|
||||
last_import_type < 0:
|
||||
last_import_type = 0
|
||||
self.formatComboBox.setCurrentIndex(last_import_type)
|
||||
except ValueError:
|
||||
self.formatComboBox.setCurrentIndex(0)
|
||||
|
Loading…
Reference in New Issue
Block a user