[misc] check existance of control before checking control type. fixes #4385
This commit is contained in:
parent
5795a27162
commit
c9b7dc6827
|
@ -1035,7 +1035,7 @@ class MessageWindowMgr(gobject.GObject):
|
|||
'''Same as get_control. Was briefly required, is not any more.
|
||||
May be useful some day in the future?'''
|
||||
ctrl = self.get_control(jid, acct)
|
||||
if ctrl.type_id == message_control.TYPE_GC:
|
||||
if ctrl and ctrl.type_id == message_control.TYPE_GC:
|
||||
return ctrl
|
||||
return None
|
||||
|
||||
|
|
Loading…
Reference in New Issue