diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2008-10-09 18:27:52 +0400 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2008-10-09 18:27:52 +0400 |
commit | ecce19505c4a947a90489c72c318240a54dbbacb (patch) | |
tree | 12d2327eb8a5bd3dafc995286c4e5842ace9e989 | |
parent | bb22fbda50f73de2c7543af558e8b39654701213 (diff) |
prevent traceback when private message window creation fails. Fixes #4393
-rw-r--r-- | src/groupchat_control.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 2831321ba..d5472c350 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -991,7 +991,7 @@ class GroupchatControl(ChatControlBase): fjid = gajim.construct_fjid(self.room_jid, nick) # 'fake' jid ctrl = self._start_private_message(nick) - if msg: + if ctrl and msg: ctrl.send_message(msg) def on_send_file(self, widget, gc_contact): @@ -2190,7 +2190,8 @@ class GroupchatControl(ChatControlBase): if not ctrl: ctrl = gajim.interface.new_private_chat(gc_c, self.account) - ctrl.parent_win.set_active_tab(ctrl) + if ctrl: + ctrl.parent_win.set_active_tab(ctrl) return ctrl |