[misc] check existance of control before checking control type. fixes #4385

This commit is contained in:
Yann Leboulanger 2008-10-07 08:20:46 +00:00
parent 5795a27162
commit c9b7dc6827
1 changed files with 1 additions and 1 deletions

View File

@ -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