DroidFish: Fixed crash when engine did not report a ponder move.

This commit is contained in:
Peter Osterlund
2012-07-20 21:38:25 +00:00
parent c0bc8d3556
commit 1f5f5c9522
2 changed files with 3 additions and 1 deletions

View File

@@ -430,6 +430,8 @@ public class TextIO {
* @return True if move is valid in position pos, false otherwise.
*/
public static final boolean isValid(Position pos, Move move, ArrayList<Move> moves) {
if (move == null)
return false;
if (moves == null) {
moves = new MoveGen().pseudoLegalMoves(pos);
moves = MoveGen.removeIllegal(pos, moves);