1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00

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
This commit is contained in:
Wouter Coekaerts 2010-03-21 20:23:34 +00:00 committed by coekie
parent e37be456cd
commit 1aa10ece88

View File

@ -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)