prevent connection to be called when there is no connection

This commit is contained in:
Jefry Lagrange 2012-11-23 21:38:36 -04:00
parent b8696b8989
commit a4fc916ab2
1 changed files with 1 additions and 1 deletions

View File

@ -1667,7 +1667,7 @@ class Connection(CommonConnection, ConnectionHandlers):
self._stun_servers = self._hosts = [i for i in result_array]
def _request_privacy(self):
if not gajim.account_is_connected(self.name):
if not gajim.account_is_connected(self.name) or not self.connection:
return
iq = common.xmpp.Iq('get', common.xmpp.NS_PRIVACY, xmlns = '')
id_ = self.connection.getAnID()