small fix

This commit is contained in:
kremsy 2017-05-12 21:34:41 +02:00
parent 8a3184c224
commit dcdb15286a

View File

@ -304,8 +304,11 @@ class StatisticCollector implements CallbackListener { //TODO remove old callbac
$durationTime = ($structure->getTime() - $this->startPlayLoopTime) / 1000; $durationTime = ($structure->getTime() - $this->startPlayLoopTime) / 1000;
//TODO reverify why player can be 0
if($structure->getPlayer()){
$this->maniaControl->getStatisticManager()->insertStat(self::STAT_PLAYTIME, $structure->getPlayer(), $this->maniaControl->getServer()->index, $durationTime); $this->maniaControl->getStatisticManager()->insertStat(self::STAT_PLAYTIME, $structure->getPlayer(), $this->maniaControl->getServer()->index, $durationTime);
} }
}
/** /**