diff options
author | louiz’ <louiz@louiz.org> | 2017-05-02 14:46:03 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2017-05-02 15:00:21 +0200 |
commit | 0a8a77e64ce4c314d8e6fa9eda8fc47f8cdef080 (patch) | |
tree | cb3782d98f6da1d803cdb17f9e4605890586644c /src | |
parent | ea65b43cc2ad17879332941293ead8e36a219800 (diff) | |
download | biboumi-0a8a77e64ce4c314d8e6fa9eda8fc47f8cdef080.tar.gz biboumi-0a8a77e64ce4c314d8e6fa9eda8fc47f8cdef080.tar.bz2 biboumi-0a8a77e64ce4c314d8e6fa9eda8fc47f8cdef080.tar.xz biboumi-0a8a77e64ce4c314d8e6fa9eda8fc47f8cdef080.zip |
Fix a segmentation fault when connecting to a server without a port
fix #3260
Diffstat (limited to 'src')
-rw-r--r-- | src/irc/irc_client.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp index 90fad75..31d6278 100644 --- a/src/irc/irc_client.cpp +++ b/src/irc/irc_client.cpp @@ -183,6 +183,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(); |