From bf9c6fb6a152b0e8ce2ef72b5e32c4d4bd554a65 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 30 Oct 2009 09:44:40 +0100 Subject: [PATCH] prevent traceback when changing resource of a control when there is no event for the account at all. Fixes #5375 --- src/common/events.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/events.py b/src/common/events.py index c69fc27d1..4e5068652 100644 --- a/src/common/events.py +++ b/src/common/events.py @@ -163,6 +163,8 @@ class Events: del self._events[account][jid] def change_jid(self, account, old_jid, new_jid): + if account not in self._events: + return if old_jid not in self._events[account]: return if new_jid in self._events[account]: