summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-12-12 20:03:42 +0100
committerFlorent Le Coz <louiz@louiz.org>2012-01-26 10:05:34 +0100
commitedf2392fcfdf89ae9696bccf8491abadfcef65cc (patch)
tree6139f0f2a892b2e918a227cb7ae94742e23628b9 /src
parent0d5b96fd8dafcb9727c4d65b2191f0cf56872463 (diff)
downloadpoezio-edf2392fcfdf89ae9696bccf8491abadfcef65cc.tar.gz
poezio-edf2392fcfdf89ae9696bccf8491abadfcef65cc.tar.bz2
poezio-edf2392fcfdf89ae9696bccf8491abadfcef65cc.tar.xz
poezio-edf2392fcfdf89ae9696bccf8491abadfcef65cc.zip
Avoid a traceback on focusing a PrivateTab from a MucTab we already left. fixed #2308
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 14af2206..661b4112 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -1470,14 +1470,14 @@ class PrivateTab(ChatTab):
self.text_win.remove_line_separator()
self.text_win.add_line_separator()
tab = self.core.get_tab_by_name(JID(self.name).bare, MucTab)
- if tab.joined and config.get_by_tabname('send_chat_states', 'true', self.general_jid, True) == 'true' and not self.input.get_text():
+ if tab and tab.joined and config.get_by_tabname('send_chat_states', 'true', self.general_jid, True) == 'true' and not self.input.get_text():
self.send_chat_state('inactive')
def on_gain_focus(self):
self.state = 'current'
curses.curs_set(1)
tab = self.core.get_tab_by_name(JID(self.name).bare, MucTab)
- if tab.joined and config.get_by_tabname('send_chat_states', 'true', self.general_jid, True) == 'true' and not self.input.get_text():
+ if tab and tab.joined and config.get_by_tabname('send_chat_states', 'true', self.general_jid, True) == 'true' and not self.input.get_text():
self.send_chat_state('active')
def on_scroll_up(self):