summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-server.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-04-05 21:17:03 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-04-05 21:17:03 +0200
commit0b20cb449a2c541b055fc58efaf64155d310846d (patch)
tree99f8e64654e1aea105022f96b1b60f486e8fcdbb /src/plugins/irc/irc-server.c
parent5c801f2741dec493bf2801203f9d0937c1f91cc4 (diff)
downloadweechat-0b20cb449a2c541b055fc58efaf64155d310846d.zip
tests: add tests on function irc_server_alloc_with_url
Diffstat (limited to 'src/plugins/irc/irc-server.c')
-rw-r--r--src/plugins/irc/irc-server.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c
index 7392e1298..3be948895 100644
--- a/src/plugins/irc/irc-server.c
+++ b/src/plugins/irc/irc-server.c
@@ -1699,6 +1699,9 @@ irc_server_alloc_with_url (const char *irc_url)
int ipv6, ssl, length;
struct t_irc_server *ptr_server;
+ if (!irc_url || !irc_url[0])
+ return NULL;
+
irc_url2 = strdup (irc_url);
if (!irc_url2)
return NULL;