DroidFish: Added safety check to avoid null pointer exception in reportPromotePiece.

This commit is contained in:
Peter Osterlund 2011-12-04 10:36:56 +00:00
parent 6194043af9
commit 68ecd0c854

View File

@ -562,8 +562,10 @@ public class DroidChessController {
}
}
Move promoteMove;
private Move promoteMove;
public final void reportPromotePiece(int choice) {
if (promoteMove == null)
return;
final boolean white = game.currPos().whiteMove;
int promoteTo;
switch (choice) {