Skip to content

Commit

Permalink
Fix NPE in LangServ on bad aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
PseudoKnight committed Dec 11, 2024
1 parent 7b59107 commit b0cf01a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/java/com/laytonsmith/core/Script.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class Script {
private List<Token> left;
private List<Token> fullRight;
private List<Construct> cleft;
private List<ParseTree> cright;
private final List<ParseTree> cright = new ArrayList<>();
private boolean nolog = false;
//This should be null if we are running in non-alias mode
private Map<String, Variable> leftVars;
Expand Down Expand Up @@ -192,7 +192,6 @@ public static Script GenerateScript(ParseTree tree, String label, SmartComment c

s.hasBeenCompiled = true;
s.compilerError = false;
s.cright = new ArrayList<>();
s.cright.add(tree);
s.label = label;
s.smartComment = comment;
Expand Down Expand Up @@ -929,7 +928,6 @@ public void compileRight(Environment env) throws ConfigCompileException, ConfigC
}
}
right.add(temp);
cright = new ArrayList<>();
for(List<Token> l : right) {
StaticAnalysis analysis = new StaticAnalysis(true);
cright.add(MethodScriptCompiler.compile(new TokenStream(l, fileOptions), env, envs, analysis));
Expand Down

0 comments on commit b0cf01a

Please sign in to comment.