Correct index out of bounds exception in focusGoDown

Adds a check to prevent list index from going negative

Fixes#17
This commit is contained in:
lmann99 2017-01-26 00:46:46 -05:00
parent d1c6144ae3
commit a4b1f3bc14

View file

@ -609,7 +609,7 @@ public abstract class TreeController<T extends ITreeNode<T>> extends GenericForw
int myPosition = parent.getIndex();
if (myPosition < treeItems.size() - 1) {
if ((myPosition < treeItems.size() - 1) && myPosition > -1) {
// The current node is not the last one
Treerow downTreerow = treeItems.get(myPosition + 1).getTreerow();