From b7e167fa95c523cec15394f058699d1fbdc79b69 Mon Sep 17 00:00:00 2001 From: kremsy Date: Wed, 9 Apr 2014 10:22:28 +0200 Subject: [PATCH] double erase mapfix --- application/core/Maps/MapManager.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/core/Maps/MapManager.php b/application/core/Maps/MapManager.php index 21b2a944..c3b51a7c 100644 --- a/application/core/Maps/MapManager.php +++ b/application/core/Maps/MapManager.php @@ -224,13 +224,13 @@ class MapManager implements CallbackListener { * @param bool $message */ 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); + if(!isset($this->maps[$uid])){ + $this->maniaControl->chat->sendError("Map is not existing!", $admin->login); return; } + $map = $this->maps[$uid]; + // Unset the Map everywhere $this->mapQueue->removeFromMapQueue($admin, $map->uid);