diff --git a/src/gajim.py b/src/gajim.py
index 3395f27aab6206340008ba344eaf0c68cfa70457..75e53e439a28a861673909f520e3926adadbc250 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -888,7 +888,7 @@ def handle_event_gc_notify(self, account, array):
 		# Get the window and control for the updated status, this may be a
 		# PrivateChatControl
 		control = self.msg_win_mgr.get_control(room_jid, account)
-		if control.type_id != message_control.TYPE_GC:
+		if control and control.type_id != message_control.TYPE_GC:
 			return
 		if control:
 			control.chg_contact_status(nick, show, status, array[4], array[5],