prevent traceback when destroy handler already clean self.instances[account]['online_dialog'] dict. Fixes #5604

This commit is contained in:
Yann Leboulanger 2010-02-16 10:41:16 +01:00
parent 9d9ef1da89
commit 408be06002
1 changed files with 3 additions and 1 deletions

View File

@ -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()