mirror of
https://gitlab.com/AutumnMeowMeow/jexer
synced 2024-09-19 11:50:19 -06:00
#115 check for null in TList.setSelectedIndex()
This commit is contained in:
parent
961fa67fc0
commit
a6fdc996d2
1 changed files with 1 additions and 1 deletions
|
@ -457,7 +457,7 @@ public class TList extends TScrollableWidget {
|
|||
* @param index -1 to unselect, otherwise the index into the list
|
||||
*/
|
||||
public final void setSelectedIndex(final int index) {
|
||||
if ((strings.size() == 0) || (index < 0)) {
|
||||
if ((strings == null) || (strings.size() == 0) || (index < 0)) {
|
||||
toTop();
|
||||
selectedString = -1;
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue