From 8d28ccfc2b8550c0de43c730d7545ff8e0e7a9b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Thu, 15 May 2014 17:58:57 +0200 Subject: [PATCH] null object access fixed --- application/core/Plugins/PluginMenu.php | 1 + application/core/Statistics/SimpleStatsList.php | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/application/core/Plugins/PluginMenu.php b/application/core/Plugins/PluginMenu.php index 026eded4..fe32d1b6 100644 --- a/application/core/Plugins/PluginMenu.php +++ b/application/core/Plugins/PluginMenu.php @@ -248,6 +248,7 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns * @return Frame */ private function getPluginSettingsMenu(Frame $frame, $width, $height, Paging $paging, Player $player, $settingClass) { + // TODO: use maniacontrolsettings menu $settings = $this->maniaControl->settingManager->getSettingsByClass($settingClass); $pageSettingsMaxCount = 12; diff --git a/application/core/Statistics/SimpleStatsList.php b/application/core/Statistics/SimpleStatsList.php index 80769db1..c856b2da 100644 --- a/application/core/Statistics/SimpleStatsList.php +++ b/application/core/Statistics/SimpleStatsList.php @@ -14,12 +14,12 @@ use FML\ManiaLink; use ManiaControl\Callbacks\CallbackListener; use ManiaControl\Callbacks\CallbackManager; use ManiaControl\Commands\CommandListener; -use ManiaControl\Utils\Formatter; use ManiaControl\ManiaControl; use ManiaControl\Manialinks\ManialinkManager; use ManiaControl\Manialinks\ManialinkPageAnswerListener; use ManiaControl\Players\Player; use ManiaControl\Players\PlayerManager; +use ManiaControl\Utils\Formatter; /** * Simple Stats List Class @@ -214,6 +214,9 @@ class SimpleStatsList implements ManialinkPageAnswerListener, CallbackListener, foreach ($statRankings[$order] as $playerId => $value) { $listPlayer = $this->maniaControl->playerManager->getPlayerByIndex($playerId); + if (!$listPlayer) { + continue; + } if ($i == 15) { break; }