1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 04:46:37 +02:00

relay: fix crash on /upgrade when nick in irc client is not yet set

This commit is contained in:
Sebastien Helleu
2011-04-25 11:19:47 +02:00
parent 7dabe70800
commit 4130ea6e77
2 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -1017,7 +1017,10 @@ relay_client_irc_alloc_with_infolist (struct t_relay_client *client,
{
RELAY_IRC_DATA(client, address) = strdup (weechat_infolist_string (infolist, "address"));
RELAY_IRC_DATA(client, password_ok) = weechat_infolist_integer (infolist, "password_ok");
RELAY_IRC_DATA(client, nick) = strdup (weechat_infolist_string (infolist, "nick"));
if (weechat_infolist_string (infolist, "nick"))
RELAY_IRC_DATA(client, nick) = strdup (weechat_infolist_string (infolist, "nick"));
else
RELAY_IRC_DATA(client, nick) = NULL;
RELAY_IRC_DATA(client, user_received) = weechat_infolist_integer (infolist, "user_received");
RELAY_IRC_DATA(client, connected) = weechat_infolist_integer (infolist, "connected");
if (RELAY_IRC_DATA(client, connected))