avoid error accessing a nil-list
authorClaus Gittinger <cg@exept.de>
Tue, 14 Mar 2006 14:03:15 +0100
changeset 2941 51cafd3a8877
parent 2940 a42b0b174ab9
child 2942 71ae03ccdaf2
avoid error accessing a nil-list
ComboListView.st
--- a/ComboListView.st	Mon Mar 13 20:27:30 2006 +0100
+++ b/ComboListView.st	Tue Mar 14 14:03:15 2006 +0100
@@ -572,8 +572,9 @@
                     ^ self.
                 ]
             ].
-
-            newContents := list at:idx ifAbsent:nil.
+            list notNil ifTrue:[
+                newContents := list at:idx ifAbsent:nil.
+            ]
         ].
         self contents:newContents
     ].
@@ -650,5 +651,5 @@
 !ComboListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ComboListView.st,v 1.39 2005-12-27 16:27:40 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ComboListView.st,v 1.40 2006-03-14 13:03:15 cg Exp $'
 ! !