From 9ce0166777fae8482da4bc22b0fe3fe43febd169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 19 Mar 2018 20:16:01 +0100 Subject: Add a missing pointer check --- src/xmpp/biboumi_adhoc_commands.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/xmpp') diff --git a/src/xmpp/biboumi_adhoc_commands.cpp b/src/xmpp/biboumi_adhoc_commands.cpp index 66298d4..93732ba 100644 --- a/src/xmpp/biboumi_adhoc_commands.cpp +++ b/src/xmpp/biboumi_adhoc_commands.cpp @@ -406,10 +406,9 @@ void ConfigureIrcServerStep2(XmppComponent&, AdhocSession& session, XmlNode& com const XmlNode* value = field->get_child("value", "jabber:x:data"); const std::vector values = field->get_children("value", "jabber:x:data"); - if (field->get_tag("var") == "address") - { - options.col() = value->get_inner(); - } + if (field->get_tag("var") == "address" && value) + options.col() = value->get_inner(); + if (field->get_tag("var") == "ports") { std::string ports; @@ -443,6 +442,7 @@ void ConfigureIrcServerStep2(XmppComponent&, AdhocSession& session, XmlNode& com else if (field->get_tag("var") == "nick" && value) options.col() = value->get_inner(); + else if (field->get_tag("var") == "pass" && value) options.col() = value->get_inner(); -- cgit v1.2.3