Fixed possible NPE in TurnMods.skipStep.

This commit is contained in:
LevelX2 2013-09-28 12:02:33 +02:00
parent a9415db2e5
commit 3da3d1c875

View file

@ -112,7 +112,7 @@ public class TurnMods extends ArrayList<TurnMod> {
while (it.hasPrevious()) {
TurnMod turnMod = it.previous();
if (turnMod.getSkipStep() != null) {
if (turnMod.getPlayerId().equals(playerId)) {
if (turnMod.getPlayerId() != null && turnMod.getPlayerId().equals(playerId)) {
if (turnMod.getSkipStep() == step) {
it.remove();
return true;