From 408be06002e53379083ae4efbbaeae5cdba70857 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 16 Feb 2010 10:41:16 +0100 Subject: [PATCH] prevent traceback when destroy handler already clean self.instances[account]['online_dialog'] dict. Fixes #5604 --- src/gui_interface.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui_interface.py b/src/gui_interface.py index 67333879e..788330d62 100644 --- a/src/gui_interface.py +++ b/src/gui_interface.py @@ -214,7 +214,9 @@ class Interface: # .keys() is needed to not have a dictionary length changed # during iteration error self.instances[account]['online_dialog'][name].destroy() - del self.instances[account]['online_dialog'][name] + if name in self.instances[account]['online_dialog']: + # destroy handler may have already removed it + del self.instances[account]['online_dialog'][name] for request in self.gpg_passphrase.values(): if request: request.interrupt()