diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2012-10-21 03:57:27 +0200 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2012-10-21 04:07:29 +0200 |
commit | 0ee0c84952217d56c275607ffc888388ad1508a7 (patch) | |
tree | b215ca3b27d7495aa8ffa9458afa5ab48e365382 /android | |
parent | 05057c03047a2b9650b4ebeb309a4b0a3bdb9f62 (diff) | |
download | mupdf-0ee0c84952217d56c275607ffc888388ad1508a7.tar.xz |
Android: handle empty downloads directory
Diffstat (limited to 'android')
-rw-r--r-- | android/src/com/artifex/mupdf/ChoosePDFActivity.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/android/src/com/artifex/mupdf/ChoosePDFActivity.java b/android/src/com/artifex/mupdf/ChoosePDFActivity.java index 1171f55c..5b41e979 100644 --- a/android/src/com/artifex/mupdf/ChoosePDFActivity.java +++ b/android/src/com/artifex/mupdf/ChoosePDFActivity.java @@ -65,8 +65,9 @@ public class ChoosePDFActivity extends ListActivity { }); List<String> fileNames = new ArrayList<String>(); - for (File f : mFiles) - fileNames.add(f.getName()); + if (mFiles != null) + for (File f : mFiles) + fileNames.add(f.getName()); ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.picker_entry, fileNames); setListAdapter(adapter); |