From 9fdabeb633e6ccf3533f370b4de7bfd6a1b50380 Mon Sep 17 00:00:00 2001 From: kremsy Date: Wed, 9 Apr 2014 10:21:34 +0200 Subject: [PATCH] double erase map bugfix --- application/core/Maps/MapManager.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/application/core/Maps/MapManager.php b/application/core/Maps/MapManager.php index 8614123f..21b2a944 100644 --- a/application/core/Maps/MapManager.php +++ b/application/core/Maps/MapManager.php @@ -225,7 +225,12 @@ class MapManager implements CallbackListener { */ public function removeMap(Player $admin, $uid, $eraseFile = false, $message = true) { $map = $this->maps[$uid]; - + + if(!$map){ + $this->maniaControl->chat->sendError("Map is not existing anymore)", $admin->login); + return; + } + // Unset the Map everywhere $this->mapQueue->removeFromMapQueue($admin, $map->uid);