diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-12-12 20:03:42 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2012-01-26 10:05:34 +0100 |
commit | edf2392fcfdf89ae9696bccf8491abadfcef65cc (patch) | |
tree | 6139f0f2a892b2e918a227cb7ae94742e23628b9 | |
parent | 0d5b96fd8dafcb9727c4d65b2191f0cf56872463 (diff) | |
download | poezio-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
-rw-r--r-- | src/tabs.py | 4 |
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): |