nil check bug fix
authorClaus Gittinger <cg@exept.de>
Tue, 29 Aug 2000 11:39:24 +0200
changeset 1402 7abc17031163
parent 1401 f125c85f21e2
child 1403 26707fae4b93
nil check bug fix
UIPainterView.st
--- a/UIPainterView.st	Tue Aug 29 11:37:43 2000 +0200
+++ b/UIPainterView.st	Tue Aug 29 11:39:24 2000 +0200
@@ -249,7 +249,7 @@
     "cut the selection into the cut&paste-buffer
      and open a transaction
     "
-    |specs coll index oldSelection newSelection treeModel parent children size|
+    |specs coll index oldSelection newSelection treeModel parent children size nd|
 
     coll := self minSetOfSuperViews:(self selection).
 
@@ -287,7 +287,9 @@
             buffered ifTrue: [self setSelection:specs].
             treeView selection:nil.
             treeView selection:(Array with: newSelection).
-            self setSelection:treeView selectedNode contents view withRedraw:true.
+            (nd := treeView selectedNode) notNil ifTrue:[
+                self setSelection:nd contents view withRedraw:true.
+            ]
         ]
     ]
 !