From e6f63f59e9b14201daa7d6b56b701b19b5616921 Mon Sep 17 00:00:00 2001 From: Peter Osterlund Date: Fri, 20 Jan 2012 19:12:04 +0000 Subject: [PATCH] DroidFish: Avoid null pointer exception if engine reports that it is currently searching an invalid move. --- DroidFish/src/org/petero/droidfish/gamelogic/TextIO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DroidFish/src/org/petero/droidfish/gamelogic/TextIO.java b/DroidFish/src/org/petero/droidfish/gamelogic/TextIO.java index 5668978..750d7d0 100644 --- a/DroidFish/src/org/petero/droidfish/gamelogic/TextIO.java +++ b/DroidFish/src/org/petero/droidfish/gamelogic/TextIO.java @@ -321,7 +321,7 @@ public class TextIO { } private static final String moveToString(Position pos, Move move, boolean longForm, List 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);