mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-15 15:48:26 -04:00
One-liner: fix profiles being sometimes null
This commit is contained in:
parent
3c845e6855
commit
f52b4ed0f1
@ -81,6 +81,7 @@ public class BaseMainActivity extends BaseActivity {
|
||||
mControlLayout = findViewById(R.id.main_control_layout);
|
||||
|
||||
mProfile = PojavProfile.getCurrentProfileContent(this);
|
||||
LauncherProfiles.update();
|
||||
minecraftProfile = LauncherProfiles.mainProfileJson.profiles.get(LauncherPreferences.DEFAULT_PREF.getString(LauncherPreferences.PREF_KEY_CURRENT_PROFILE,""));
|
||||
if(minecraftProfile == null) {
|
||||
Toast.makeText(this,"Attempted to launch nonexistent profile",Toast.LENGTH_SHORT).show();
|
||||
@ -88,7 +89,6 @@ public class BaseMainActivity extends BaseActivity {
|
||||
return;
|
||||
}
|
||||
String runtime = LauncherPreferences.PREF_DEFAULT_RUNTIME;
|
||||
LauncherProfiles.update();
|
||||
|
||||
mVersionInfo = Tools.getVersionInfo(null, BaseLauncherActivity.getVersionId(
|
||||
minecraftProfile.lastVersionId));
|
||||
|
Loading…
x
Reference in New Issue
Block a user