Skip to content

Commit

Permalink
Fixed infinite-recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
huanghongxun committed Mar 4, 2016
1 parent afde411 commit 1818b35
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ void makeLaunchScript(Profile profile) {
};

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) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ public HMCLMinecraftService(Profile p) {
}

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()) {
Expand Down

0 comments on commit 1818b35

Please sign in to comment.