Add a bunch of None checks, even if many may be redundant
This commit is contained in:
@@ -156,7 +156,9 @@ class GuiWordList(QDialog):
|
||||
try:
|
||||
with open(tmpFile, mode="w", encoding="utf-8") as outFile:
|
||||
for i in range(self.listBox.count()):
|
||||
outFile.write(self.listBox.item(i).text() + "\n")
|
||||
item = self.listBox.item(i)
|
||||
if item is not None:
|
||||
outFile.write(item.text() + "\n")
|
||||
|
||||
except Exception:
|
||||
logger.error("Could not save new word list")
|
||||
|
||||
Reference in New Issue
Block a user