From 0a8a77e64ce4c314d8e6fa9eda8fc47f8cdef080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Tue, 2 May 2017 14:46:03 +0200 Subject: Fix a segmentation fault when connecting to a server without a port fix #3260 --- src/irc/irc_client.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/irc') 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(); -- cgit v1.2.3