care for missing mclass in category:
authorClaus Gittinger <cg@exept.de>
Mon, 10 Mar 2008 10:25:48 +0100
changeset 10910 d6eb44699802
parent 10909 5f5e63c29ae2
child 10911 38e7677d10a7
care for missing mclass in category:
Method.st
--- a/Method.st	Mon Mar 10 08:10:58 2008 +0100
+++ b/Method.st	Mon Mar 10 10:25:48 2008 +0100
@@ -318,11 +318,13 @@
         newCategory ~= (oldCategory := category) ifTrue:[
             self setCategory:newCategory.
 
-            cls := self mclass.    
-            cls addChangeRecordForMethodCategory:self category:newCategory.
-            self changed:#category with:oldCategory.            "/ will vanish
-            cls changed:#organization with:self selector.       "/ will vanish
-            Smalltalk changed:#methodCategory with:(Array with:cls with:self with:oldCategory). 
+            cls := self mclass.
+            cls notNil ifTrue:[
+                cls addChangeRecordForMethodCategory:self category:newCategory.
+                self changed:#category with:oldCategory.            "/ will vanish
+                cls changed:#organization with:self selector.       "/ will vanish
+                Smalltalk changed:#methodCategory with:(Array with:cls with:self with:oldCategory). 
+            ]
         ]
     ]
 
@@ -2819,7 +2821,7 @@
 !Method class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.311 2008-01-27 16:23:01 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.312 2008-03-10 09:25:48 cg Exp $'
 ! !
 
 Method initialize!