Skip to content

Commit

Permalink
fix npe in MozillaSuiteTest
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri authored and gbrail committed Nov 30, 2022
1 parent a6aa8f8 commit cbf8333
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/org/mozilla/javascript/ScriptRuntime.java
Original file line number Diff line number Diff line change
Expand Up @@ -4267,7 +4267,7 @@ public static void setFunctionProtoAndParent(
BaseFunction fn, Context cx, Scriptable scope, boolean es6GeneratorFunction) {
setFunctionProtoAndParent(fn, scope, es6GeneratorFunction);

if (cx.getLanguageVersion() >= Context.VERSION_ES6) {
if (cx != null && cx.getLanguageVersion() >= Context.VERSION_ES6) {
fn.setStandardPropertyAttributes(ScriptableObject.READONLY | ScriptableObject.DONTENUM);
}
}
Expand Down

0 comments on commit cbf8333

Please sign in to comment.