From 113b757dbfe15656aaf0e4a08b2e38ed916f0d64 Mon Sep 17 00:00:00 2001 From: Chris Kearney <chris.kearney@urbanairship.com> Date: Sat, 23 Aug 2014 12:19:16 -0700 Subject: [PATCH] null check --- .../comandante/creeper/command/commands/MovementCommand.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/comandante/creeper/command/commands/MovementCommand.java b/src/main/java/com/comandante/creeper/command/commands/MovementCommand.java index 10179d22..473ecd82 100644 --- a/src/main/java/com/comandante/creeper/command/commands/MovementCommand.java +++ b/src/main/java/com/comandante/creeper/command/commands/MovementCommand.java @@ -72,6 +72,8 @@ public class MovementCommand extends Command { movement = new Movement(player, currentRoom.getRoomId(), destinationRoom.getRoomId(), this, "exited to the west."); } gameManager.movePlayer(movement); - gameManager.currentRoomLogic(movement.getPlayer().getPlayerId()); + if (movement != null) { + gameManager.currentRoomLogic(movement.getPlayer().getPlayerId()); + } } } -- GitLab