Fixed possible NPE by getting game start or end time (Fixes #323).

This commit is contained in:
LevelX2 2013-09-12 13:06:56 +02:00
parent 818f528c7f
commit 594b6c1c75

View file

@ -1964,11 +1964,17 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
@Override @Override
public Date getStartTime() { public Date getStartTime() {
if (startTime == null) {
return null;
}
return new Date(startTime.getTime()); return new Date(startTime.getTime());
} }
@Override @Override
public Date getEndTime() { public Date getEndTime() {
if (endTime == null) {
return null;
}
return new Date(endTime.getTime()); return new Date(endTime.getTime());
} }