From 7138a5def9cf3fa8a4b3ffc39ab5206b4b8da99b Mon Sep 17 00:00:00 2001 From: pk910 Date: Sat, 8 Sep 2012 17:33:26 +0200 Subject: [PATCH] fixed crash in module.c if no bot is available --- 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 ff5f8f6..c08e0fb 100644 --- a/src/modules/stats.mod/module.c +++ b/src/modules/stats.mod/module.c @@ -94,7 +94,7 @@ static TIMEQ_CALLBACK(stats_timer_callback) { if(get_int_field(tmp)) pkgpos += sprintf(pkgbuf + pkgpos, "*\n"); else { - struct ClientSocket *bot, *bot1, *bot2, *bot3; + struct ClientSocket *bot, *bot1 = NULL, *bot2 = NULL, *bot3 = NULL; for(bot = getBots(SOCKET_FLAG_READY, NULL); bot; bot = getBots(SOCKET_FLAG_READY, bot)) { if(bot->botid == 1 && (bot->flags & SOCKET_FLAG_PREFERRED)) bot1 = bot; -- 2.20.1