1
0
forked from bip/bip

[FIX] check for weird shape notice messages

Prevents a fatal on some rare conditions
This commit is contained in:
Arnaud Cornet 2009-01-27 08:25:44 +01:00
parent c2b3090e47
commit 5416fc19b2

View File

@ -529,9 +529,11 @@ void log_notice(log_t *logdata, const char *ircmask, const char *destination,
const char *message)
{
if (!ischannel(*destination)) {
char *nick = nick_from_ircmask(ircmask);
do_log_privmsg(logdata, nick, 0, ircmask, message);
free(nick);
if (ircmask) {
char *nick = nick_from_ircmask(ircmask);
do_log_privmsg(logdata, nick, 0, ircmask, message);
free(nick);
}
} else {
do_log_privmsg(logdata, destination, 0, ircmask, message);
}