DroidFish: Avoid null pointer exception if engine reports that it is currently searching an invalid move.

This commit is contained in:
Peter Osterlund 2012-01-20 19:12:04 +00:00
parent f74bf81fd4
commit e6f63f59e9

View File

@ -321,7 +321,7 @@ public class TextIO {
}
private static final String moveToString(Position pos, Move move, boolean longForm,
List<Move> moves) {
if (move.equals(new Move(0, 0, 0)))
if ((move == null) || move.equals(new Move(0, 0, 0)))
return "--";
StringBuilder ret = new StringBuilder();
int wKingOrigPos = Position.getSquare(4, 0);