Fix NullPointerException when upgrade from 2.x
This commit is contained in:
@@ -135,6 +135,11 @@ public final class LauncherHelper {
|
|||||||
if (java.getParsedVersion() < JavaVersion.JAVA_8) {
|
if (java.getParsedVersion() < JavaVersion.JAVA_8) {
|
||||||
MessageBox.show(Main.i18n("launch.advice.newer_java"));
|
MessageBox.show(Main.i18n("launch.advice.newer_java"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (java.getParsedVersion() >= JavaVersion.JAVA_9) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (java.getPlatform() == org.jackhuang.hmcl.util.Platform.BIT_32 &&
|
if (java.getPlatform() == org.jackhuang.hmcl.util.Platform.BIT_32 &&
|
||||||
org.jackhuang.hmcl.util.Platform.IS_64_BIT) {
|
org.jackhuang.hmcl.util.Platform.IS_64_BIT) {
|
||||||
MessageBox.show(Main.i18n("launch.advice.different_platform"));
|
MessageBox.show(Main.i18n("launch.advice.different_platform"));
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ public final class Profile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setGlobal(VersionSetting global) {
|
public void setGlobal(VersionSetting global) {
|
||||||
|
if (global == null)
|
||||||
|
global = new VersionSetting();
|
||||||
globalProperty.set(global);
|
globalProperty.set(global);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user