From 4f221cabba35356e39ad33cdb6f9469fe90eb2a9 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 25 Jul 2017 19:22:11 +0100 Subject: [PATCH] Fix the NPE that caused MPS crashes --- .../src/nautilus/game/arcade/game/games/moba/Moba.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/moba/Moba.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/moba/Moba.java index 474f03a22..62c399321 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/moba/Moba.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/moba/Moba.java @@ -44,7 +44,6 @@ import nautilus.game.arcade.game.games.moba.kit.hp.HPManager; import nautilus.game.arcade.game.games.moba.kit.larissa.HeroLarissa; import nautilus.game.arcade.game.games.moba.kit.rowena.HeroRowena; import nautilus.game.arcade.game.games.moba.minion.MinionManager; -import nautilus.game.arcade.game.games.moba.modes.MobaMap; import nautilus.game.arcade.game.games.moba.modes.MobaMapType; import nautilus.game.arcade.game.games.moba.overtime.OvertimeManager; import nautilus.game.arcade.game.games.moba.progression.MobaProgression; @@ -109,8 +108,6 @@ public class Moba extends TeamGame private PlayerMapBoard _board; private MapBoardSelector _selector; - private MobaMap _map; - private int _inPlayers; public Moba(ArcadeManager manager, GameType gameType, String[] description) @@ -226,7 +223,7 @@ public class Moba extends TeamGame mapType = MobaMapType.HEROES_VALLEY; } - _map = registerManager(mapType.createInstance(this)); + registerManager(mapType.createInstance(this)); if (Manager.IsRewardStats() && Manager.GetLobby() instanceof NewGameLobbyManager) { @@ -315,7 +312,7 @@ public class Moba extends TeamGame private void cleanupLobby() { - if (_mapManager != null) + if (_mapManager != null && _board != null) { _mapManager.cleanupBoard(_board); _selector.cleanup();