Fix crash by detecting NULL channel in url_join_only() and just returning.

This commit is contained in:
RichardHitt 2013-01-10 00:13:25 -08:00
parent 672dbf75d6
commit 475eb9fcaa
1 changed files with 2 additions and 0 deletions

View File

@ -3350,6 +3350,8 @@ static void
url_join_only (server *serv, char *tbuf, char *channel)
{
/* already connected, JOIN only. FIXME: support keys? */
if (channel == NULL)
return;
tbuf[0] = '#';
/* tbuf is 4kb */
safe_strcpy ((tbuf + 1), channel, 256);