From c9b7dc68274fa544e030927c2679da39fc639bf7 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 7 Oct 2008 08:20:46 +0000 Subject: [PATCH] [misc] check existance of control before checking control type. fixes #4385 --- src/message_window.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/message_window.py b/src/message_window.py index 53d8dfa8b..cbdaa6e39 100644 --- a/src/message_window.py +++ b/src/message_window.py @@ -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