diff --git a/src/core/network-openssl.c b/src/core/network-openssl.c index 9ca16e07..66445c03 100644 --- a/src/core/network-openssl.c +++ b/src/core/network-openssl.c @@ -312,6 +312,8 @@ GIOChannel *net_connect_ip_ssl(IPADDR *ip, int port, IPADDR *my_ip, const char * GIOChannel *handle, *ssl_handle; handle = net_connect_ip(ip, port, my_ip); + if (handle == NULL) + return NULL; ssl_handle = irssi_ssl_get_iochannel(handle, cert, pkey, cafile, capath, verify); if (ssl_handle == NULL) g_io_channel_unref(handle);