From f52b4ed0f140608bb711f3a96316857e8c4f1a7c Mon Sep 17 00:00:00 2001 From: artdeell Date: Thu, 26 May 2022 19:19:07 +0300 Subject: [PATCH] One-liner: fix profiles being sometimes null --- .../src/main/java/net/kdt/pojavlaunch/BaseMainActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/BaseMainActivity.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/BaseMainActivity.java index 7531e2154..d3b9cc876 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/BaseMainActivity.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/BaseMainActivity.java @@ -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));