prevent traceback when private message window creation fails. Fixes #4393
This commit is contained in:
parent
bb22fbda50
commit
ecce19505c
|
@ -991,7 +991,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
fjid = gajim.construct_fjid(self.room_jid, nick) # 'fake' jid
|
fjid = gajim.construct_fjid(self.room_jid, nick) # 'fake' jid
|
||||||
|
|
||||||
ctrl = self._start_private_message(nick)
|
ctrl = self._start_private_message(nick)
|
||||||
if msg:
|
if ctrl and msg:
|
||||||
ctrl.send_message(msg)
|
ctrl.send_message(msg)
|
||||||
|
|
||||||
def on_send_file(self, widget, gc_contact):
|
def on_send_file(self, widget, gc_contact):
|
||||||
|
@ -2190,6 +2190,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
if not ctrl:
|
if not ctrl:
|
||||||
ctrl = gajim.interface.new_private_chat(gc_c, self.account)
|
ctrl = gajim.interface.new_private_chat(gc_c, self.account)
|
||||||
|
|
||||||
|
if ctrl:
|
||||||
ctrl.parent_win.set_active_tab(ctrl)
|
ctrl.parent_win.set_active_tab(ctrl)
|
||||||
|
|
||||||
return ctrl
|
return ctrl
|
||||||
|
|
Loading…
Reference in New Issue