check for existence of mx data

This commit is contained in:
Steffen Schröder 2014-09-01 03:28:51 +02:00
parent f43aa884d5
commit 0680b75cc5

View File

@ -578,12 +578,12 @@ class MapManager implements CallbackListener {
/**
* Get's a Map by it's Mania-Exchange Id
*
* @param $mxId
* @param int $mxId
* @return Map
*/
public function getMapByMxId($mxId) {
foreach ($this->maps as $map) {
if ($map->mx->id == $mxId) {
if ($map->mx && $map->mx->id == $mxId) {
return $map;
}
}