mirror of
https://github.com/irssi/irssi.git
synced 2024-08-25 04:04:18 -04:00
Merge pull request #529 from ailin-nemui/issue500
fix nick->host == NULL crash
This commit is contained in:
parent
31c0a9d7e8
commit
3c29b44408
@ -602,9 +602,6 @@ static void sig_nicklist_new(CHANNEL_REC *channel, NICK_REC *nick)
|
||||
char *nickhost, *p;
|
||||
int n;
|
||||
|
||||
if (nick->host == NULL)
|
||||
return;
|
||||
|
||||
firstnick = g_hash_table_lookup(channel->nicks, nick->nick);
|
||||
if (firstnick->next == NULL)
|
||||
return;
|
||||
@ -617,6 +614,9 @@ static void sig_nicklist_new(CHANNEL_REC *channel, NICK_REC *nick)
|
||||
return; /* nope, we have it */
|
||||
}
|
||||
|
||||
if (nick->host == NULL)
|
||||
return;
|
||||
|
||||
/* identical nick already exists, have to change it somehow.. */
|
||||
p = strchr(nick->host, '@');
|
||||
if (p == NULL) p = nick->host; else p++;
|
||||
|
Loading…
Reference in New Issue
Block a user