From 594b6c1c75712ce9731a63e5e3af5376ef0a0a18 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 12 Sep 2013 13:06:56 +0200 Subject: [PATCH] Fixed possible NPE by getting game start or end time (Fixes #323). --- Mage/src/mage/game/GameImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Mage/src/mage/game/GameImpl.java b/Mage/src/mage/game/GameImpl.java index f5218d6862..13aeaaef68 100644 --- a/Mage/src/mage/game/GameImpl.java +++ b/Mage/src/mage/game/GameImpl.java @@ -1964,11 +1964,17 @@ public abstract class GameImpl> implements Game, Serializa @Override public Date getStartTime() { + if (startTime == null) { + return null; + } return new Date(startTime.getTime()); } @Override public Date getEndTime() { + if (endTime == null) { + return null; + } return new Date(endTime.getTime()); }