prevent error on null object
This commit is contained in:
1 parent
2fd369d746
commit
8c5b7b4b14
1 file changed
+4
-1
@@ -562,7 +562,10 @@ class MapManager implements CallbackListener {
|
|||||||
* Restructures the Maplist
|
* Restructures the Maplist
|
||||||
*/
|
*/
|
||||||
public function restructureMapList() {
|
public function restructureMapList() {
|
||||||
$currentIndex = $this->getMapIndex($this->currentMap);
|
$currentIndex = 0;
|
||||||
|
if ($this->currentMap) {
|
||||||
|
$currentIndex = $this->getMapIndex($this->currentMap);
|
||||||
|
}
|
||||||
|
|
||||||
// No RestructureNeeded
|
// No RestructureNeeded
|
||||||
if ($currentIndex < Maplist::MAX_MAPS_PER_PAGE - 1) {
|
if ($currentIndex < Maplist::MAX_MAPS_PER_PAGE - 1) {
|
||||||
|
|||||||
Reference in new issue
Block a user