mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-04-13 15:42:47 +02: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…
x
Reference in New Issue
Block a user