double erase mapfix

This commit is contained in:
kremsy 2014-04-09 10:22:28 +02:00 committed by Steffen Schröder
parent 9fdabeb633
commit b7e167fa95

View File

@ -224,13 +224,13 @@ class MapManager implements CallbackListener {
* @param bool $message * @param bool $message
*/ */
public function removeMap(Player $admin, $uid, $eraseFile = false, $message = true) { public function removeMap(Player $admin, $uid, $eraseFile = false, $message = true) {
$map = $this->maps[$uid]; if(!isset($this->maps[$uid])){
$this->maniaControl->chat->sendError("Map is not existing!", $admin->login);
if(!$map){
$this->maniaControl->chat->sendError("Map is not existing anymore)", $admin->login);
return; return;
} }
$map = $this->maps[$uid];
// Unset the Map everywhere // Unset the Map everywhere
$this->mapQueue->removeFromMapQueue($admin, $map->uid); $this->mapQueue->removeFromMapQueue($admin, $map->uid);