mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 02:03:47 +01:00
Android: Avoid crash without ext dir.
This can return null on some older Androids. See #14821.
This commit is contained in:
1 parent
f1c05b0395
commit
db21d0e7fc
1 file changed
+2
-1
@@ -400,7 +400,8 @@ public abstract class NativeActivity extends Activity {
|
||||
|
||||
String extStorageState = Environment.getExternalStorageState();
|
||||
String extStorageDir = Environment.getExternalStorageDirectory().getAbsolutePath();
|
||||
String externalFilesDir = this.getExternalFilesDir(null).getAbsolutePath();
|
||||
File externalFiles = this.getExternalFilesDir(null);
|
||||
String externalFilesDir = externalFiles == null ? "" : externalFiles.getAbsolutePath();
|
||||
|
||||
Log.i(TAG, "Ext storage: " + extStorageState + " " + extStorageDir);
|
||||
Log.i(TAG, "Ext files dir: " + externalFilesDir);
|
||||
|
||||
Reference in new issue
Block a user