# HG changeset patch # User Charly COSTE # Date 1263746556 -3600 # Node ID ddc87b605019efd54960cc470320a5d9b2e47a58 # Parent fcab2bdf1d6501bda907cce257e69ef3704fddc4 minor fix in Participant.changeNickname() Signed-off-by: Charly COSTE diff --git a/participant.py b/participant.py --- a/participant.py +++ b/participant.py @@ -182,6 +182,7 @@ class Participant: def changeNickname(self, newnick, on_protocol): """Change participant's nickname.""" + p = None oldnick = self.nickname if self.protocol == 'xmpp': @@ -242,6 +243,10 @@ class Participant: self.nickname = newnick self.duplicate_nickname = newnick + + if not isinstance(p, Participant): + return + if p.nickname == newnick: if p.protocol == self.protocol: # should never happen