diff options
author | Micah Lee <micah@micahflee.com> | 2019-01-20 16:34:56 -0800 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2019-01-20 16:34:56 -0800 |
commit | 02538520a20fca491add9cb11b8dd3978ffe4331 (patch) | |
tree | 6d34f48d3d4a3f3b9bc447f8bfaa6780690dd98b | |
parent | 04e43856673abcb4ec9830022f5b3b800b5b44d8 (diff) | |
download | onionshare-02538520a20fca491add9cb11b8dd3978ffe4331.tar.gz onionshare-02538520a20fca491add9cb11b8dd3978ffe4331.zip |
Skip updating or canceling items that haven't been added
-rw-r--r-- | onionshare_gui/mode/history.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/onionshare_gui/mode/history.py b/onionshare_gui/mode/history.py index bb419ec7..b54b6f5f 100644 --- a/onionshare_gui/mode/history.py +++ b/onionshare_gui/mode/history.py @@ -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): """ |