mirror of
https://github.com/irssi/irssi.git
synced 2026-08-19 16:42:30 +02:00
fix nick->host == NULL crash
This commit is contained in:
parent
17f4bd2060
commit
681caf2b58
1 changed files with 3 additions and 3 deletions
|
|
@ -603,9 +603,6 @@ static void sig_nicklist_new(CHANNEL_REC *channel, NICK_REC *nick)
|
||||||
char *nickhost, *p;
|
char *nickhost, *p;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
if (nick->host == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
firstnick = g_hash_table_lookup(channel->nicks, nick->nick);
|
firstnick = g_hash_table_lookup(channel->nicks, nick->nick);
|
||||||
if (firstnick->next == NULL)
|
if (firstnick->next == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
@ -618,6 +615,9 @@ static void sig_nicklist_new(CHANNEL_REC *channel, NICK_REC *nick)
|
||||||
return; /* nope, we have it */
|
return; /* nope, we have it */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nick->host == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
/* identical nick already exists, have to change it somehow.. */
|
/* identical nick already exists, have to change it somehow.. */
|
||||||
p = strchr(nick->host, '@');
|
p = strchr(nick->host, '@');
|
||||||
if (p == NULL) p = nick->host; else p++;
|
if (p == NULL) p = nick->host; else p++;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue