diff --git a/src/gajim.py b/src/gajim.py
index c850464dca73e4c983228f1fe046d05a134141a1..79a2934044b52aa3b4761cfaaf9a3bae2ad5263d 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -1735,7 +1735,8 @@ class Interface:
 		jid = gajim.get_jid_without_resource(jid)
 		if type_ in ('printed_gc_msg', 'gc_msg'):
 			w = self.msg_win_mgr.get_window(jid, account)
-		elif type_ in ('printed_chat', 'chat'):
+		elif type_ in ('printed_chat', 'chat', ''):
+			# '' is for log in/out notifications
 			if self.msg_win_mgr.has_window(fjid, account):
 				w = self.msg_win_mgr.get_window(fjid, account)
 			elif self.msg_win_mgr.has_window(jid, account):