Skip to content

Commit

Permalink
Fix cmdline interpreter exception on empty input
Browse files Browse the repository at this point in the history
  • Loading branch information
Pieter12345 committed Aug 31, 2024
1 parent 8d8f807 commit 9c178e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/laytonsmith/tools/Interpreter.java
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,8 @@ public void execute(String script, List<String> args, File fromFile) throws Conf
@Override
public void run() {
try {
if(tree.getChildren().size() == 1 && tree.getChildAt(0).getData() instanceof IVariable ivar) {
if(tree != null && tree.getChildren().size() == 1
&& tree.getChildAt(0).getData() instanceof IVariable ivar) {
Mixed i = env.getEnv(GlobalEnv.class).GetVarList()
.get(ivar.getVariableName(), ivar.getTarget(), env).ival();
StreamUtils.GetSystemOut().println(i.val());
Expand Down

0 comments on commit 9c178e9

Please sign in to comment.