diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2015-07-28 21:19:19 +0300 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2015-07-28 21:19:19 +0300 |
commit | 15fce42a607af43e71865ee22cdb5a59beb7b482 (patch) | |
tree | 8c85cc7f10373794379a8c705e23bd2c150b8acb /src | |
parent | 96f642b309d0690b2112c3c7473cb8c98ea2c190 (diff) |
prevent traceback
Diffstat (limited to 'src')
-rw-r--r-- | src/common/connection.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/connection.py b/src/common/connection.py index 4c090a518..258fc2e9d 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -914,7 +914,9 @@ class Connection(CommonConnection, ConnectionHandlers): self.sm.enabled = False gajim.nec.push_incoming_event(OurShowEvent(None, conn=self, show='error')) - self.connection.UnregisterDisconnectHandler(self._disconnectedReconnCB) + if self.connection: + self.connection.UnregisterDisconnectHandler( + self._disconnectedReconnCB) self.disconnect() if gajim.config.get_per('accounts', self.name, 'autoreconnect'): self.connected = -1 |