From 3a6974c0b013594a449c6d5f98a832f832465ce2 Mon Sep 17 00:00:00 2001 From: Zzooouhh Date: Sat, 23 Dec 2017 19:42:02 +0100 Subject: [PATCH] NullPointerException fix --- .../Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer6.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer6.java b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer6.java index f281d360e2..b4055ba53f 100644 --- a/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer6.java +++ b/Mage.Server.Plugins/Mage.Player.AI.MA/src/mage/player/ai/ComputerPlayer6.java @@ -489,7 +489,9 @@ public class ComputerPlayer6 extends ComputerPlayer /*implements Player*/ { maxSeconds = 3600; } logger.debug("maxThink: " + maxSeconds + " seconds "); - return task.get(maxSeconds, TimeUnit.SECONDS); + if (task.get(maxSeconds, TimeUnit.SECONDS) != null) { + return task.get(maxSeconds, TimeUnit.SECONDS); + } } catch (TimeoutException e) { logger.info("simulating - timed out"); task.cancel(true);