Fix NullPointerException when upgrade from 2.x

This commit is contained in:
huangyuhui
2018-01-28 14:16:05 +08:00
parent 538cc2b75e
commit b707388134
2 changed files with 7 additions and 0 deletions

View File

@@ -135,6 +135,11 @@ public final class LauncherHelper {
if (java.getParsedVersion() < JavaVersion.JAVA_8) {
MessageBox.show(Main.i18n("launch.advice.newer_java"));
}
if (java.getParsedVersion() >= JavaVersion.JAVA_9) {
}
if (java.getPlatform() == org.jackhuang.hmcl.util.Platform.BIT_32 &&
org.jackhuang.hmcl.util.Platform.IS_64_BIT) {
MessageBox.show(Main.i18n("launch.advice.different_platform"));

View File

@@ -64,6 +64,8 @@ public final class Profile {
}
public void setGlobal(VersionSetting global) {
if (global == null)
global = new VersionSetting();
globalProperty.set(global);
}