mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-12-06 02:40:23 -08:00
Don't crash with file chooser errors
This commit is contained in:
parent
3162f043d2
commit
51888a6853
1 changed files with 51 additions and 47 deletions
|
|
@ -101,6 +101,7 @@ public class AndroidLauncher extends AndroidApplication{
|
|||
}
|
||||
|
||||
void showFileChooser(boolean open, String title, Cons<Fi> cons, String... extensions){
|
||||
try{
|
||||
String extension = extensions[0];
|
||||
|
||||
if(VERSION.SDK_INT >= VERSION_CODES.Q){
|
||||
|
|
@ -160,6 +161,9 @@ public class AndroidLauncher extends AndroidApplication{
|
|||
super.showFileChooser(open, "@open", extension, cons);
|
||||
}
|
||||
}
|
||||
}catch(Throwable error){
|
||||
Core.app.post(() -> Vars.ui.showException(error));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue