From fb504308d03e078422422b57323f89ae86dac466 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Wed, 13 Mar 2019 18:40:45 +0100 Subject: Entity capabilities: Check c node for ver attribute fixes #530 --- xmpp-vala/src/module/xep/0115_entitiy_capabilities.vala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xmpp-vala/src/module/xep/0115_entitiy_capabilities.vala b/xmpp-vala/src/module/xep/0115_entitiy_capabilities.vala index 19b0be3e..75b87e38 100644 --- a/xmpp-vala/src/module/xep/0115_entitiy_capabilities.vala +++ b/xmpp-vala/src/module/xep/0115_entitiy_capabilities.vala @@ -46,7 +46,8 @@ namespace Xmpp.Xep.EntityCapabilities { private void on_received_presence(XmppStream stream, Presence.Stanza presence) { StanzaNode? c_node = presence.stanza.get_subnode("c", NS_URI); if (c_node != null) { - string ver_attribute = c_node.get_attribute("ver", NS_URI); + string? ver_attribute = c_node.get_attribute("ver", NS_URI); + if (ver_attribute == null) return; Gee.List capabilities = storage.get_features(ver_attribute); if (capabilities.size == 0) { stream.get_module(ServiceDiscovery.Module.IDENTITY).request_info(stream, presence.from, (stream, query_result) => { -- cgit v1.2.3-70-g09d2