diff --git a/src/gajim.py b/src/gajim.py
index 1427f6906b6970b72df973d827d554b3de3c460b..fd49ccca0d3bc35f99f95d63012c7690e90db8c6 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -500,7 +500,6 @@ class Interface:
 		# without resource
 		ctrl = self.msg_win_mgr.get_control(full_jid_with_resource, account)
 		if ctrl:
-			jid_of_control = full_jid_with_resource
 			chat_control = ctrl
 		elif not pm and (not highest_contact or not highest_contact.resource):
 			# unknow contact or offline message