mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-27 06:10:28 +01:00
DroidFish: Added safety check to avoid null pointer exception in reportPromotePiece.
This commit is contained in:
parent
6194043af9
commit
68ecd0c854
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user