Skip to content
Snippets Groups Projects
Commit 2f7e8e63 authored by Fabian Vu's avatar Fabian Vu
Browse files

Fix an NPE with machine inclusion

parent dc8cac09
No related branches found
No related tags found
No related merge requests found
Pipeline #148155 passed
...@@ -307,7 +307,7 @@ public class ExpressionGenerator { ...@@ -307,7 +307,7 @@ public class ExpressionGenerator {
} }
if(substitutionGenerator.getCurrentLocalScope() > 0 && identifierGenerator.getCurrentLocals().containsKey(node.getName())) { if(substitutionGenerator.getCurrentLocalScope() > 0 && identifierGenerator.getCurrentLocals().containsKey(node.getName())) {
boolean isAssigned = identifierGenerator.isAssigned(node, node.getParent()); boolean isAssigned = identifierGenerator.isAssigned(node, node.getParent());
boolean isParam = node.getDeclarationNode().getKind().equals(DeclarationNode.Kind.OP_INPUT_PARAMETER); boolean isParam = node.getDeclarationNode() != null && DeclarationNode.Kind.OP_INPUT_PARAMETER.equals(node.getDeclarationNode().getKind());
return identifierGenerator.generateVarDeclaration(node.getName(), isAssigned, isParam); return identifierGenerator.generateVarDeclaration(node.getName(), isAssigned, isParam);
} }
return identifierGenerator.generate(node); return identifierGenerator.generate(node);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment