Add a bunch of None checks, even if many may be redundant

This commit is contained in:
Veronica Berglyd Olsen
2022-10-20 00:21:51 +02:00
parent cfe11f7b54
commit 815c0f1125
9 changed files with 45 additions and 33 deletions
+1 -1
View File
@@ -117,7 +117,7 @@ class GuiDocMerge(QDialog):
finalItems = []
for i in range(self.listBox.count()):
item = self.listBox.item(i)
if item.checkState() == Qt.Checked:
if item is not None and item.checkState() == Qt.Checked:
finalItems.append(item.data(Qt.UserRole))
self._data["moveToTrash"] = self.trashSwitch.isChecked()