summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-03-19 20:16:01 +0100
committerlouiz’ <louiz@louiz.org>2018-03-19 20:16:01 +0100
commit9ce0166777fae8482da4bc22b0fe3fe43febd169 (patch)
treede2e342728f654b1da9394536786f38ae40930c4 /src
parent619c991a691a455efee2baa4e1fe96e64d27ff64 (diff)
downloadbiboumi-9ce0166777fae8482da4bc22b0fe3fe43febd169.tar.gz
biboumi-9ce0166777fae8482da4bc22b0fe3fe43febd169.tar.bz2
biboumi-9ce0166777fae8482da4bc22b0fe3fe43febd169.tar.xz
biboumi-9ce0166777fae8482da4bc22b0fe3fe43febd169.zip
Add a missing pointer check
Diffstat (limited to 'src')
-rw-r--r--src/xmpp/biboumi_adhoc_commands.cpp8
1 files changed, 4 insertions, 4 deletions
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<const XmlNode*> values = field->get_children("value", "jabber:x:data");
- if (field->get_tag("var") == "address")
- {
- options.col<Database::Address>() = value->get_inner();
- }
+ if (field->get_tag("var") == "address" && value)
+ options.col<Database::Address>() = 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<Database::Nick>() = value->get_inner();
+
else if (field->get_tag("var") == "pass" && value)
options.col<Database::Pass>() = value->get_inner();