mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
Fixed possible NPE by getting game start or end time (Fixes #323).
This commit is contained in:
parent
818f528c7f
commit
594b6c1c75
1 changed files with 6 additions and 0 deletions
|
@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue