mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-20 20:52:18 +01:00
DroidFish: Avoid null pointer exception in pgn load/save.
This commit is contained in:
@@ -56,7 +56,7 @@ public class EditPGN extends ListActivity {
|
|||||||
static boolean cacheValid = false;
|
static boolean cacheValid = false;
|
||||||
PGNFile pgnFile;
|
PGNFile pgnFile;
|
||||||
ProgressDialog progress;
|
ProgressDialog progress;
|
||||||
GameInfo selectedGi = null;
|
private GameInfo selectedGi = null;
|
||||||
ArrayAdapter<GameInfo> aa = null;
|
ArrayAdapter<GameInfo> aa = null;
|
||||||
EditText filterText = null;
|
EditText filterText = null;
|
||||||
|
|
||||||
@@ -241,6 +241,8 @@ public class EditPGN extends ListActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onItemClick(AdapterView<?> parent, View view, int pos, long id) {
|
public void onItemClick(AdapterView<?> parent, View view, int pos, long id) {
|
||||||
selectedGi = aa.getItem(pos);
|
selectedGi = aa.getItem(pos);
|
||||||
|
if (selectedGi == null)
|
||||||
|
return;
|
||||||
if (loadGame) {
|
if (loadGame) {
|
||||||
defaultItem = pos;
|
defaultItem = pos;
|
||||||
sendBackResult(selectedGi);
|
sendBackResult(selectedGi);
|
||||||
|
|||||||
Reference in New Issue
Block a user