This commit is contained in:
huangyuhui 2018-09-11 19:26:36 +08:00
parent 5cbde9cc33
commit 4e6237c062

View File

@ -17,6 +17,7 @@
*/ */
package org.jackhuang.hmcl.setting; package org.jackhuang.hmcl.setting;
import javafx.application.Platform;
import javafx.beans.Observable; import javafx.beans.Observable;
import javafx.beans.property.ObjectProperty; import javafx.beans.property.ObjectProperty;
import javafx.beans.property.ReadOnlyListProperty; import javafx.beans.property.ReadOnlyListProperty;
@ -87,7 +88,7 @@ public final class Profiles {
if (profiles.isEmpty()) { if (profiles.isEmpty()) {
Profile current = new Profile(Profiles.DEFAULT_PROFILE, new File(".minecraft"), new VersionSetting(), null, true); Profile current = new Profile(Profiles.DEFAULT_PROFILE, new File(".minecraft"), new VersionSetting(), null, true);
Profile home = new Profile(Profiles.HOME_PROFILE, Launcher.MINECRAFT_DIRECTORY); Profile home = new Profile(Profiles.HOME_PROFILE, Launcher.MINECRAFT_DIRECTORY);
profiles.addAll(current, home); Platform.runLater(() -> profiles.addAll(current, home));
} }
} }