[Trac #42138]Fix NPE when the size of the list adapter is just one.