summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-02-23 11:37:12 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-02-23 11:37:12 +0000
commited270073836abd7953206e18e69757ec349e49a9 (patch)
treee2bca2f1c5ea452f906f6333be6fe1ba2da3a1fd
parentcf944fc03b2ebaf52f0f5b600c4605301b07184e (diff)
downloadirssi-ed270073836abd7953206e18e69757ec349e49a9.zip
crashfix
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1298 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r--src/core/nicklist.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/nicklist.c b/src/core/nicklist.c
index 118b6b48..ac6028e3 100644
--- a/src/core/nicklist.c
+++ b/src/core/nicklist.c
@@ -446,10 +446,12 @@ static NICK_REC *nick_nfind(CHANNEL_REC *channel, const char *nick, int len)
tmpnick = g_strndup(nick, len);
rec = g_hash_table_lookup(channel->nicks, tmpnick);
- /* if there's multiple, get the one with identical case */
- while (rec->next != NULL) {
- if (strcmp(rec->nick, tmpnick) == 0)
- break;
+ if (rec != NULL) {
+ /* if there's multiple, get the one with identical case */
+ while (rec->next != NULL) {
+ if (strcmp(rec->nick, tmpnick) == 0)
+ break;
+ }
}
g_free(tmpnick);