prevent traceback

This commit is contained in:
Yann Leboulanger 2015-07-28 20:19:19 +02:00
parent 96f642b309
commit 15fce42a60
1 changed files with 3 additions and 1 deletions

View File

@ -914,7 +914,9 @@ class Connection(CommonConnection, ConnectionHandlers):
self.sm.enabled = False self.sm.enabled = False
gajim.nec.push_incoming_event(OurShowEvent(None, conn=self, gajim.nec.push_incoming_event(OurShowEvent(None, conn=self,
show='error')) show='error'))
self.connection.UnregisterDisconnectHandler(self._disconnectedReconnCB) if self.connection:
self.connection.UnregisterDisconnectHandler(
self._disconnectedReconnCB)
self.disconnect() self.disconnect()
if gajim.config.get_per('accounts', self.name, 'autoreconnect'): if gajim.config.get_per('accounts', self.name, 'autoreconnect'):
self.connected = -1 self.connected = -1