1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Add server check in irc_server_connect (#208)

Fail instead of crash, if irc_server_connect is called without object.
(#208)
This commit is contained in:
Geert Hauwaerts 2015-06-12 17:44:13 +02:00
parent 01510b7d9e
commit 4cc6fdaaab

View File

@ -314,6 +314,8 @@ SERVER_REC *irc_server_init_connect(SERVER_CONNECT_REC *conn)
void irc_server_connect(SERVER_REC *server)
{
g_return_if_fail(server != NULL);
if (!server_start_connect(server)) {
server_connect_unref(server->connrec);
g_free(server);