From ecce19505c4a947a90489c72c318240a54dbbacb Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 9 Oct 2008 14:27:52 +0000 Subject: [PATCH] prevent traceback when private message window creation fails. Fixes #4393 --- src/groupchat_control.py | 5 +++-- 1 file 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