We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40d7c38 commit cdab860Copy full SHA for cdab860
src/org/mozilla/javascript/ScriptableObject.java
@@ -1259,7 +1259,7 @@ static <T extends Scriptable> BaseFunction buildClassCtor(
1259
Object existing = getProperty(getTopLevelScope(scope), className);
1260
if (existing instanceof BaseFunction) {
1261
Object existingProto = ((BaseFunction)existing).getPrototypeProperty();
1262
- if (clazz.equals(existingProto.getClass())) {
+ if (existingProto != null && clazz.equals(existingProto.getClass())) {
1263
return (BaseFunction)existing;
1264
}
1265
0 commit comments