JS: fix NPE in incremental compilation

Fix NPE when compiling project incrementally and a file which
is not recompiled contains try/catch statement
This commit is contained in:
Alexey Andreev
2017-03-29 17:31:16 +03:00
parent f916d83978
commit df46417cd7
3 changed files with 23 additions and 1 deletions
@@ -93,7 +93,7 @@ public class JsCatch extends SourceInfoAwareJsNode implements HasCondition {
@NotNull
@Override
public JsCatch deepCopy() {
JsCatchScope scopeCopy = scope.copy();
JsCatchScope scopeCopy = scope != null ? scope.copy() : null;
JsBlock bodyCopy = AstUtil.deepCopy(body);
JsExpression conditionCopy = AstUtil.deepCopy(condition);
JsParameter paramCopy = AstUtil.deepCopy(param);