mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-02-05 16:44:47 +08:00
Fixed infinite-recursion
This commit is contained in:
parent
afde41135a
commit
1818b3575c
@ -31,9 +31,7 @@ import org.jackhuang.hellominecraft.launcher.core.service.IMinecraftProvider;
|
||||
import org.jackhuang.hellominecraft.launcher.core.service.IMinecraftService;
|
||||
import org.jackhuang.hellominecraft.util.system.FileUtils;
|
||||
import org.jackhuang.hellominecraft.launcher.core.MCUtils;
|
||||
import org.jackhuang.hellominecraft.util.tasks.DecompressTask;
|
||||
import org.jackhuang.hellominecraft.util.tasks.TaskWindow;
|
||||
import org.jackhuang.hellominecraft.util.tasks.download.FileDownloadTask;
|
||||
import org.jackhuang.hellominecraft.util.system.IOUtils;
|
||||
import org.jackhuang.hellominecraft.util.MessageBox;
|
||||
import org.jackhuang.hellominecraft.util.StrUtils;
|
||||
|
@ -124,8 +124,10 @@ public class LaunchingUIDaemon {
|
||||
};
|
||||
|
||||
private static void checkExit(LauncherVisibility v) {
|
||||
if (v != LauncherVisibility.KEEP && !LogWindow.INSTANCE.isVisible())
|
||||
if (v != LauncherVisibility.KEEP && !LogWindow.INSTANCE.isVisible()) {
|
||||
HMCLog.log("Launcher will exit now.");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
private static final Event<List<String>> LAUNCH_SCRIPT_FINISHER = (sender, str) -> {
|
||||
|
@ -48,7 +48,7 @@ public class CrashReporter implements Thread.UncaughtExceptionHandler {
|
||||
put("MessageBox", "");
|
||||
put("AWTError", "");
|
||||
put("JFileChooser", "Has your operating system been installed completely or is a ghost system? ");
|
||||
put("JceSecurityManager", "Has your operating system been installed completely or is a ghost system? ");
|
||||
put("JceSecurity", "Has your operating system been installed completely or is a ghost system? ");
|
||||
put("couldn't create component peer", "Fucking computer!");
|
||||
put("sun.awt.shell.Win32ShellFolder2", "crash.user_fault");
|
||||
put("UnsatisfiedLinkError", "crash.user_fault");
|
||||
|
@ -67,6 +67,12 @@ public class HMCLMinecraftService extends IMinecraftService {
|
||||
}
|
||||
|
||||
private void checkModpack() {
|
||||
int show = 0;
|
||||
for (StackTraceElement e : Thread.currentThread().getStackTrace())
|
||||
if ("checkModpack".equals(e.getMethodName()))
|
||||
++show;
|
||||
if (show > 2)
|
||||
return;
|
||||
if (version().getVersionCount() == 0) {
|
||||
File modpack = new File("modpack.zip");
|
||||
if (modpack.exists()) {
|
||||
|
Loading…
Reference in New Issue
Block a user