dont crash if oldSource is not available.
authorClaus Gittinger <cg@exept.de>
Sat, 05 Jul 1997 21:21:23 +0200
changeset 597 d8b3b9622b39
parent 596 b659e02f7293
child 598 4e50a2b76fa2
dont crash if oldSource is not available.
HistMgr.st
HistoryManager.st
--- a/HistMgr.st	Sat Jul 05 20:16:10 1997 +0200
+++ b/HistMgr.st	Sat Jul 05 21:21:23 1997 +0200
@@ -312,7 +312,7 @@
      (something contains aSymbol describing what happened)"
 
     |sourceCode newMethod fileInOrRecompiling selector oldMethod what
-     changedClass whatChange|
+     changedClass whatChange oldSource|
 
     "/
     "/ no action, if disabled
@@ -434,10 +434,13 @@
                 newMethod := changedClass compiledMethodAt:selector.
 
                 oldMethod notNil ifTrue:[
-                    (oldMethod source asString withTabsExpanded = sourceCode asString withTabsExpanded) ifTrue:[
-                         "/ no change (accepted same code again ?)
-                        ^ self
-                    ].
+                    oldSource := oldMethod source.
+                    oldSource notNil ifTrue:[
+                        (oldSource asString withTabsExpanded = sourceCode asString withTabsExpanded) ifTrue:[
+                             "/ no change (accepted same code again ?)
+                            ^ self
+                        ].
+                    ]
                 ].
 
                 "/
@@ -486,7 +489,7 @@
     ^self
 
     "Modified: 27.8.1995 / 02:14:43 / claus"
-    "Modified: 9.1.1997 / 02:27:28 / cg"
+    "Modified: 5.7.1997 / 21:18:15 / cg"
 ! !
 
 !HistoryManager methodsFor:'initialization'!
@@ -663,6 +666,6 @@
 !HistoryManager class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/Attic/HistMgr.st,v 1.36 1997-06-28 18:24:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/Attic/HistMgr.st,v 1.37 1997-07-05 19:21:23 cg Exp $'
 ! !
 HistoryManager initialize!
--- a/HistoryManager.st	Sat Jul 05 20:16:10 1997 +0200
+++ b/HistoryManager.st	Sat Jul 05 21:21:23 1997 +0200
@@ -312,7 +312,7 @@
      (something contains aSymbol describing what happened)"
 
     |sourceCode newMethod fileInOrRecompiling selector oldMethod what
-     changedClass whatChange|
+     changedClass whatChange oldSource|
 
     "/
     "/ no action, if disabled
@@ -434,10 +434,13 @@
                 newMethod := changedClass compiledMethodAt:selector.
 
                 oldMethod notNil ifTrue:[
-                    (oldMethod source asString withTabsExpanded = sourceCode asString withTabsExpanded) ifTrue:[
-                         "/ no change (accepted same code again ?)
-                        ^ self
-                    ].
+                    oldSource := oldMethod source.
+                    oldSource notNil ifTrue:[
+                        (oldSource asString withTabsExpanded = sourceCode asString withTabsExpanded) ifTrue:[
+                             "/ no change (accepted same code again ?)
+                            ^ self
+                        ].
+                    ]
                 ].
 
                 "/
@@ -486,7 +489,7 @@
     ^self
 
     "Modified: 27.8.1995 / 02:14:43 / claus"
-    "Modified: 9.1.1997 / 02:27:28 / cg"
+    "Modified: 5.7.1997 / 21:18:15 / cg"
 ! !
 
 !HistoryManager methodsFor:'initialization'!
@@ -663,6 +666,6 @@
 !HistoryManager class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.36 1997-06-28 18:24:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/HistoryManager.st,v 1.37 1997-07-05 19:21:23 cg Exp $'
 ! !
 HistoryManager initialize!