diff --git a/third-party/android-filechooser/code/src/group/pals/android/lib/ui/filechooser/FileChooserActivity.java b/third-party/android-filechooser/code/src/group/pals/android/lib/ui/filechooser/FileChooserActivity.java index e87c8d340..e5f121460 100755 --- a/third-party/android-filechooser/code/src/group/pals/android/lib/ui/filechooser/FileChooserActivity.java +++ b/third-party/android-filechooser/code/src/group/pals/android/lib/ui/filechooser/FileChooserActivity.java @@ -456,6 +456,11 @@ public class FileChooserActivity extends Activity { @Override public void onBackPressed() { IFile currentLoc = getLocation(); + if (currentLoc == null || myHistory == null) { + super.onBackPressed(); + return; + } + IFile preLoc = null; while (currentLoc.equalsToPath(preLoc = mHistory.prevOf(currentLoc))) mHistory.remove(preLoc);