#BUGFIX by cg
authorClaus Gittinger <cg@exept.de>
Wed, 19 Oct 2016 16:32:30 +0200
changeset 5936 fb13d3e9492e
parent 5935 cab56f1b13b4
child 5937 c055e993c2f7
#BUGFIX by cg class: ListSelectionBox changed: #initialize crash on empty input
ListSelectionBox.st
--- a/ListSelectionBox.st	Wed Oct 19 13:24:33 2016 +0200
+++ b/ListSelectionBox.st	Wed Oct 19 16:32:30 2016 +0200
@@ -367,10 +367,12 @@
                     [:text | |string index|
                         enterField notNil ifTrue:[
                             string := enterField contents.
-                            "/ find the first list-entry, starting with entered text
-                            index := (selectionList list ? #()) findFirst:[:line | (line ? '') string startsWith:string string].
-                            index ~~ 0 ifTrue:[
-                                selectionList scrollToLine:index "/ makeLineVisible:index.
+                            string notEmptyOrNil ifTrue:[
+                                "/ find the first list-entry, starting with entered text
+                                index := (selectionList list ? #()) findFirst:[:line | (line ? '') string startsWith:string string].
+                                index ~~ 0 ifTrue:[
+                                    selectionList scrollToLine:index "/ makeLineVisible:index.
+                                ].
                             ].
                         ].
                     ].