Metaclass.st
changeset 870 0d60b4b7962a
parent 866 615ea25db48b
child 885 ca805f0f4984
--- a/Metaclass.st	Tue Jan 16 00:36:31 1996 +0100
+++ b/Metaclass.st	Tue Jan 16 03:25:32 1996 +0100
@@ -476,7 +476,9 @@
     newComment := commentString.
 
     "look, if it already exists as a class"
-    oldClass := aSystemDictionary at:classSymbol ifAbsent:[nil].
+    aSystemDictionary notNil ifTrue:[
+        oldClass := aSystemDictionary at:classSymbol ifAbsent:[nil].
+    ].
     (oldClass isBehavior and:[oldClass isLoaded]) ifFalse:[
 	oldClass := nil.
     ] ifTrue:[
@@ -672,7 +674,9 @@
 	    newClass comment:commentString
 	].
 
-	aSystemDictionary at:classSymbol put:newClass.
+	aSystemDictionary notNil ifTrue:[
+	    aSystemDictionary at:classSymbol put:newClass.
+	].
 
 	oldClass isNil ifTrue:[
 	    project notNil ifTrue:[
@@ -686,7 +690,9 @@
 	    ].
 	].
 
-	aSystemDictionary changed:#newClass with:newClass.
+	aSystemDictionary notNil ifTrue:[
+	    aSystemDictionary changed:#newClass with:newClass.
+	].
 	^ newClass
     ].
 
@@ -732,8 +738,10 @@
 		oldClass category ~= categoryString ifTrue:[
 		    oldClass category:categoryString. 
 		    self addChangeRecordForClass:newClass.
-		    "notify change of organization"
-		    aSystemDictionary changed:#organization
+		    aSystemDictionary notNil ifTrue:[
+			"notify change of category"
+		        aSystemDictionary changed:#organization
+		    ]
 		].
 		"notify change of class"
 "/                oldClass changed.
@@ -746,8 +754,10 @@
 	      oldClass category ~= categoryString ifTrue:[
 		  "notify change of organization"
 		  oldClass category:categoryString. 
-		  "notify change of organization"
-		  aSystemDictionary changed:#organization
+		  aSystemDictionary notNil ifTrue:[
+		      "notify change of organization"
+		      aSystemDictionary changed:#organization
+		  ].
 	      ].
 
 	      "
@@ -1036,11 +1046,13 @@
     "
      and make the new class globally known
     "
-    aSystemDictionary at:classSymbol put:newClass.
+    aSystemDictionary notNil ifTrue:[
+        aSystemDictionary at:classSymbol put:newClass.
 
-    oldClass category ~= categoryString ifTrue:[
-	"notify change of organization"
-	aSystemDictionary changed:#organization
+        oldClass category ~= categoryString ifTrue:[
+	    "notify change of organization"
+	    aSystemDictionary changed:#organization
+        ].
     ].
 
     "
@@ -1354,5 +1366,5 @@
 !Metaclass class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.42 1996-01-15 21:43:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.43 1996-01-16 02:25:32 cg Exp $'
 ! !