1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-03 09:49:19 +02:00

fixed possible NPE

This commit is contained in:
Nikolay Pultsin 2015-08-07 03:30:44 +02:00
parent 6b3a3d8813
commit 237e30df4f

View file

@ -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);