From c34b4af1fda3f0fbfa147e6938b672729a565d42 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Mon, 29 Aug 2011 15:08:04 +0200
Subject: [PATCH] prevent traceback

---
 src/common/connection.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/common/connection.py b/src/common/connection.py
index edda989b63..b078ef4ce5 100644
--- a/src/common/connection.py
+++ b/src/common/connection.py
@@ -1648,6 +1648,8 @@ 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):
+            return
         iq = common.xmpp.Iq('get', common.xmpp.NS_PRIVACY, xmlns = '')
         id_ = self.connection.getAnID()
         iq.setID(id_)
-- 
GitLab