mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-23 11:31:33 +01:00
DroidFish: Avoid null pointer exception if engine reports that it is currently searching an invalid move.
This commit is contained in:
parent
f74bf81fd4
commit
e6f63f59e9
|
@ -321,7 +321,7 @@ public class TextIO {
|
||||||
}
|
}
|
||||||
private static final String moveToString(Position pos, Move move, boolean longForm,
|
private static final String moveToString(Position pos, Move move, boolean longForm,
|
||||||
List<Move> moves) {
|
List<Move> moves) {
|
||||||
if (move.equals(new Move(0, 0, 0)))
|
if ((move == null) || move.equals(new Move(0, 0, 0)))
|
||||||
return "--";
|
return "--";
|
||||||
StringBuilder ret = new StringBuilder();
|
StringBuilder ret = new StringBuilder();
|
||||||
int wKingOrigPos = Position.getSquare(4, 0);
|
int wKingOrigPos = Position.getSquare(4, 0);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user