From df6a8a0cc3b1543775bdb4e3d56dc5772b0653de Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Mon, 12 Dec 2011 20:03:42 +0100 Subject: Avoid a traceback on focusing a PrivateTab from a MucTab we already left. fixed #2308 --- src/tabs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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): -- cgit v1.2.3