From 53efa7d6afd56a390a6c9cbededf8e5e5d15688f Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 4 Oct 2003 11:30:16 +0000 Subject: Fixed bug when allocating command and autojoin strings --- src/irc/irc-server.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/irc/irc-server.c') diff --git a/src/irc/irc-server.c b/src/irc/irc-server.c index a05c51ae1..d84956ef0 100644 --- a/src/irc/irc-server.c +++ b/src/irc/irc-server.c @@ -229,8 +229,10 @@ server_new (char *name, int autoconnect, char *address, int port, (username) ? strdup (username) : strdup ("weechat"); new_server->realname = (realname) ? strdup (realname) : strdup ("realname"); - new_server->command = command; - new_server->autojoin = autojoin; + new_server->command = + (command) ? strdup (command) : NULL; + new_server->autojoin = + (autojoin) ? strdup (autojoin) : NULL; new_server->nick = strdup (new_server->nick1); } else -- cgit v1.2.3