summaryrefslogtreecommitdiff
path: root/src/irc/irc_client.cpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-05-02 14:46:03 +0200
committerlouiz’ <louiz@louiz.org>2017-05-02 14:46:03 +0200
commit25d46924bc2edd079d4d996d1d76d702d724341e (patch)
treec5f70e398ebf61472071735d1023cf282fc1a332 /src/irc/irc_client.cpp
parent9db89eb8b0daada627f1c5b934e5407d37888371 (diff)
downloadbiboumi-25d46924bc2edd079d4d996d1d76d702d724341e.tar.gz
biboumi-25d46924bc2edd079d4d996d1d76d702d724341e.tar.bz2
biboumi-25d46924bc2edd079d4d996d1d76d702d724341e.tar.xz
biboumi-25d46924bc2edd079d4d996d1d76d702d724341e.zip
Fix a segmentation fault when connecting to a server without a port4.3v4
fix #3260
Diffstat (limited to 'src/irc/irc_client.cpp')
-rw-r--r--src/irc/irc_client.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp
index b0d3a47..de6b089 100644
--- a/src/irc/irc_client.cpp
+++ b/src/irc/irc_client.cpp
@@ -182,6 +182,11 @@ void IrcClient::start()
{
if (this->is_connecting() || this->is_connected())
return;
+ if (this->ports_to_try.empty())
+ {
+ this->bridge.send_xmpp_message(this->hostname, "", "Can not connect to IRC server: no port specified.");
+ return;
+ }
std::string port;
bool tls;
std::tie(port, tls) = this->ports_to_try.top();