Skip updating or canceling items that haven't been added

This commit is contained in:
Micah Lee 2019-01-20 16:34:56 -08:00
parent 04e4385667
commit 02538520a2
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -355,13 +355,15 @@ class HistoryItemList(QtWidgets.QScrollArea):
"""
Update an item. Override this method.
"""
self.items[id].update(data)
if id in self.items:
self.items[id].update(data)
def cancel(self, id):
"""
Cancel an item. Override this method.
"""
self.items[id].cancel()
if id in self.items:
self.items[id].cancel()
def reset(self):
"""