Prevent infinite recursion

This commit is contained in:
topjohnwu 2024-06-23 19:08:06 -07:00
parent c4f0a379c6
commit 6c9618b878

View File

@ -44,6 +44,9 @@ public final class MainShell {
public static synchronized ShellImpl get() {
ShellImpl shell = getCached();
if (shell == null) {
if (isInitMain) {
throw new NoShellException("The main shell died during initialization");
}
isInitMain = true;
if (mainBuilder == null)
mainBuilder = new BuilderImpl();