From 8bce1ea94986ec1fa612070359b2828a3e07f724 Mon Sep 17 00:00:00 2001 From: kremsy Date: Sat, 15 Feb 2014 16:42:18 +0100 Subject: [PATCH] small fix --- application/core/Statistics/StatisticCollector.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/application/core/Statistics/StatisticCollector.php b/application/core/Statistics/StatisticCollector.php index 45bd26a3..19f4dace 100644 --- a/application/core/Statistics/StatisticCollector.php +++ b/application/core/Statistics/StatisticCollector.php @@ -271,7 +271,9 @@ class StatisticCollector implements CallbackListener { $victim = $this->maniaControl->playerManager->getPlayer($callback[1][1][1]); if (isset($callback[1][1][0])) { $shooter = $this->maniaControl->playerManager->getPlayer($callback[1][1][0]); - $this->maniaControl->statisticManager->incrementStat(self::STAT_ON_KILL, $shooter); + if ($shooter != null) { + $this->maniaControl->statisticManager->incrementStat(self::STAT_ON_KILL, $shooter); + } } $this->maniaControl->statisticManager->incrementStat(self::STAT_ON_DEATH, $victim); break; @@ -308,6 +310,9 @@ class StatisticCollector implements CallbackListener { $this->maniaControl->statisticManager->incrementStat(self::STAT_ON_DEATH, $victim); if (isset($paramsObject->Event->Shooter->Login)) { $shooter = $this->maniaControl->playerManager->getPlayer($paramsObject->Event->Shooter->Login); + if ($shooter != null) { + $this->maniaControl->statisticManager->incrementStat(self::STAT_ON_KILL, $shooter); + } $this->maniaControl->statisticManager->incrementStat(self::STAT_ON_KILL, $shooter); } break;