diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2016-08-22 12:27:10 +0200 |
---|---|---|
committer | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2016-08-22 12:27:10 +0200 |
commit | 681caf2b587b88d1fcf953386b2432ce5b9bbea4 (patch) | |
tree | 077776f8fabea8c8ded87d997cdbb0ee5c016b04 | |
parent | 17f4bd20601eb5af59567b68c69c396e65274327 (diff) | |
download | irssi-681caf2b587b88d1fcf953386b2432ce5b9bbea4.zip |
fix nick->host == NULL crash
-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++; |