DroidFish: Fixed crash on Android 1.6 and 2.1 when long pressing the analysis area when the computer was not analyzing.

This commit is contained in:
Peter Osterlund
2011-12-17 18:53:51 +00:00
parent 48f70b3eed
commit d2741c31c5

View File

@@ -419,8 +419,10 @@ public class DroidFish extends Activity implements GUIInterface {
}); });
thinking.setOnLongClickListener(new OnLongClickListener() { thinking.setOnLongClickListener(new OnLongClickListener() {
public boolean onLongClick(View v) { public boolean onLongClick(View v) {
if (!pvMoves.isEmpty()) {
removeDialog(THINKING_MENU_DIALOG); removeDialog(THINKING_MENU_DIALOG);
showDialog(THINKING_MENU_DIALOG); showDialog(THINKING_MENU_DIALOG);
}
return true; return true;
} }
}); });
@@ -1499,8 +1501,6 @@ public class DroidFish extends Activity implements GUIInterface {
return alert; return alert;
} }
case THINKING_MENU_DIALOG: { case THINKING_MENU_DIALOG: {
if (pvMoves.isEmpty())
return null;
final int ADD_ANALYSIS = 0; final int ADD_ANALYSIS = 0;
final int MULTIPV_DEC = 1; final int MULTIPV_DEC = 1;
final int MULTIPV_INC = 2; final int MULTIPV_INC = 2;