diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2016-08-25 04:24:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-25 04:24:07 +0200 |
commit | c8630acbafd6341cbf908ab7d011d87a8fd68b56 (patch) | |
tree | 45208cb173fbee6a08c81635d7e519491e9b7b49 /src | |
parent | 2b7f32633c07de9fc4b8751ac73cf3049976b007 (diff) | |
parent | 681caf2b587b88d1fcf953386b2432ce5b9bbea4 (diff) | |
download | irssi-c8630acbafd6341cbf908ab7d011d87a8fd68b56.zip |
Merge pull request #529 from ailin-nemui/issue500
fix nick->host == NULL crash
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/core/fe-messages.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c index bc2a30d6..487a5754 100644 --- a/src/fe-common/core/fe-messages.c +++ b/src/fe-common/core/fe-messages.c @@ -603,9 +603,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; @@ -618,6 +615,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++; |