diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py
index d73968507d0883e6a3f412195cdd4f462d5983fb..76034cb80e15ff33427b8d51fa385fa7da0bad9e 100644
--- a/src/common/connection_handlers.py
+++ b/src/common/connection_handlers.py
@@ -1820,6 +1820,8 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
 		exchange_items_list = {}
 		jid_from = helpers.get_full_jid_from_iq(msg)
 		items_list = msg.getTag('x').getChildren()
+		if not items_list:
+			return
 		action = items_list[0].getAttr('action')
 		if action == None:
 			action = 'add'