relay: fix NULL pointer on upgrade in client->protocol_args (for WeeChat protocol)

This commit is contained in:
Sebastien Helleu 2012-07-16 21:39:43 +02:00
parent beff1fc85c
commit 5dfcf614b5

View File

@ -181,8 +181,7 @@ relay_upgrade_read_cb (void *data,
new_client->status = weechat_infolist_integer (infolist, "status");
new_client->protocol = weechat_infolist_integer (infolist, "protocol");
str = weechat_infolist_string (infolist, "protocol_args");
if (str)
new_client->protocol_args = strdup (str);
new_client->protocol_args = (str) ? strdup (str) : NULL;
new_client->listen_start_time = weechat_infolist_time (infolist, "listen_start_time");
new_client->start_time = weechat_infolist_time (infolist, "start_time");
new_client->end_time = weechat_infolist_time (infolist, "end_time");