diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-12-12 20:03:42 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-12-12 20:04:39 +0100 |
commit | df6a8a0cc3b1543775bdb4e3d56dc5772b0653de (patch) | |
tree | 6139f0f2a892b2e918a227cb7ae94742e23628b9 /src | |
parent | 1b30cd09a7937c5ee0021e9eb62b9ccd065916e6 (diff) | |
download | poezio-df6a8a0cc3b1543775bdb4e3d56dc5772b0653de.tar.gz poezio-df6a8a0cc3b1543775bdb4e3d56dc5772b0653de.tar.bz2 poezio-df6a8a0cc3b1543775bdb4e3d56dc5772b0653de.tar.xz poezio-df6a8a0cc3b1543775bdb4e3d56dc5772b0653de.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.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): |