diff options
author | Wouter Coekaerts <coekie@irssi.org> | 2010-03-21 20:23:34 +0000 |
---|---|---|
committer | coekie <coekie@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2010-03-21 20:23:34 +0000 |
commit | 1aa10ece887afd5d64eca1211aeced6cab310680 (patch) | |
tree | 1373837642bd8dda5debfd6dbcca9a5631513b57 | |
parent | e37be456cde14705ec67b8b6d44bd2293b203b0d (diff) | |
download | irssi-1aa10ece887afd5d64eca1211aeced6cab310680.zip |
Fix crash when checking for fuzzy nick match when not on the channel. Reported by Aurelien Delaitre (SATE 2009)
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5126 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/core/nicklist.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/nicklist.c b/src/core/nicklist.c index 9f67f20b..c38df6d4 100644 --- a/src/core/nicklist.c +++ b/src/core/nicklist.c @@ -575,9 +575,13 @@ int nick_match_msg(CHANNEL_REC *channel, const char *msg, const char *nick) if (fullmatch) return TRUE; /* matched without fuzzyness */ - /* matched with some fuzzyness .. check if there's an exact match - for some other nick in the same channel. */ - return nick_nfind(channel, msgstart, (int) (msg-msgstart)) == NULL; + if (channel != NULL) { + /* matched with some fuzzyness .. check if there's an exact match + for some other nick in the same channel. */ + return nick_nfind(channel, msgstart, (int) (msg-msgstart)) == NULL; + } else { + return TRUE; + } } void nicklist_init(void) |