From d6c6cc31bb279b8a88830291b74023e6faec6f77 Mon Sep 17 00:00:00 2001 From: "beard%netscape.com" Date: Sun, 25 Jun 2000 16:43:25 +0000 Subject: [PATCH] check for non-null superClass --- js/js2/jsclasses.h | 3 ++- js2/src/jsclasses.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/js/js2/jsclasses.h b/js/js2/jsclasses.h index b6a4950245a8..8e5671c9f93b 100644 --- a/js/js2/jsclasses.h +++ b/js/js2/jsclasses.h @@ -88,7 +88,8 @@ namespace JSClasses { mSlotCount(superClass ? superClass->mSlotCount : 0) { // to "inherit" superClass methods. - mScope->setPrototype(superClass->mScope); + if (superClass) + mScope->setPrototype(superClass->mScope); } JSClass* getSuperClass() diff --git a/js2/src/jsclasses.h b/js2/src/jsclasses.h index b6a4950245a8..8e5671c9f93b 100644 --- a/js2/src/jsclasses.h +++ b/js2/src/jsclasses.h @@ -88,7 +88,8 @@ namespace JSClasses { mSlotCount(superClass ? superClass->mSlotCount : 0) { // to "inherit" superClass methods. - mScope->setPrototype(superClass->mScope); + if (superClass) + mScope->setPrototype(superClass->mScope); } JSClass* getSuperClass()