diff --git a/src/gajim.py b/src/gajim.py
index a2c0ceb8419bdc809dc83df907a94b8cdf17919a..6e394e730ebd790804b951bee4d87ad3c77fc0ed 100755
--- a/src/gajim.py
+++ b/src/gajim.py
@@ -776,10 +776,11 @@ class Interface:
 			# is offline, so only on Contact instance
 			if isinstance(c, list):
 				c = c[0]
-			c.last_status_time = time.localtime(time.time() - array[2])
-			if array[3]:
-				c.status = array[3]
-			win.set_last_status_time()
+			if c: # c can be none if it's a gc contact
+				c.last_status_time = time.localtime(time.time() - array[2])
+				if array[3]:
+					c.status = array[3]
+				win.set_last_status_time()
 		if self.remote_ctrl:
 			self.remote_ctrl.raise_signal('LastStatusTime', (account, array))