Update SDLActivity.java
Added a null check to fix the deck downloader menu option.
This commit is contained in:
@@ -309,6 +309,7 @@ public class SDLActivity extends Activity implements OnKeyListener {
|
||||
File root = new File(System.getenv("EXTERNAL_STORAGE") + "/Download");
|
||||
File[] files = root.listFiles();
|
||||
|
||||
if (files != null) {
|
||||
for (File f : files) {
|
||||
if (!myresult.contains(f.toString()) &&
|
||||
(f.toString().contains(".txt") ||
|
||||
@@ -317,6 +318,7 @@ public class SDLActivity extends Activity implements OnKeyListener {
|
||||
myresult.add(f.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//get first item?
|
||||
if (!myresult.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user