mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-16 16:16:04 -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);
|
mControlLayout = findViewById(R.id.main_control_layout);
|
||||||
|
|
||||||
mProfile = PojavProfile.getCurrentProfileContent(this);
|
mProfile = PojavProfile.getCurrentProfileContent(this);
|
||||||
|
LauncherProfiles.update();
|
||||||
minecraftProfile = LauncherProfiles.mainProfileJson.profiles.get(LauncherPreferences.DEFAULT_PREF.getString(LauncherPreferences.PREF_KEY_CURRENT_PROFILE,""));
|
minecraftProfile = LauncherProfiles.mainProfileJson.profiles.get(LauncherPreferences.DEFAULT_PREF.getString(LauncherPreferences.PREF_KEY_CURRENT_PROFILE,""));
|
||||||
if(minecraftProfile == null) {
|
if(minecraftProfile == null) {
|
||||||
Toast.makeText(this,"Attempted to launch nonexistent profile",Toast.LENGTH_SHORT).show();
|
Toast.makeText(this,"Attempted to launch nonexistent profile",Toast.LENGTH_SHORT).show();
|
||||||
@ -88,7 +89,6 @@ public class BaseMainActivity extends BaseActivity {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String runtime = LauncherPreferences.PREF_DEFAULT_RUNTIME;
|
String runtime = LauncherPreferences.PREF_DEFAULT_RUNTIME;
|
||||||
LauncherProfiles.update();
|
|
||||||
|
|
||||||
mVersionInfo = Tools.getVersionInfo(null, BaseLauncherActivity.getVersionId(
|
mVersionInfo = Tools.getVersionInfo(null, BaseLauncherActivity.getVersionId(
|
||||||
minecraftProfile.lastVersionId));
|
minecraftProfile.lastVersionId));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user