From 573b535067e4797c9481b0c4bd2c26d8d2ff68a5 Mon Sep 17 00:00:00 2001 From: pk910 Date: Sat, 25 Feb 2012 17:39:48 +0100 Subject: [PATCH] fixed crash in stats.mod/module.c --- src/modules/stats.mod/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/stats.mod/module.c b/src/modules/stats.mod/module.c index ee8a20d..190972c 100644 --- a/src/modules/stats.mod/module.c +++ b/src/modules/stats.mod/module.c @@ -114,7 +114,7 @@ static TIMEQ_CALLBACK(stats_timer_callback) { else bot = bot3; if(bot) { - pkgpos += sprintf(pkgbuf + pkgpos, "%s!%s@%s %d\n", bot->user->nick, bot->user->ident, bot->host, bot->port); + pkgpos += sprintf(pkgbuf + pkgpos, "%s!%s@%s %d\n", (bot->user ? bot->user->nick : "*"), (bot->user ? bot->user->ident : "*"), (bot->host ? bot->host : "*"), bot->port); } else pkgpos += sprintf(pkgbuf + pkgpos, "?\n"); } -- 2.20.1