Fixed issue cased when there are no valid selections, default should be null then.

This commit is contained in:
Brendan Robert 2016-02-14 23:00:20 -06:00
parent 609ad08bfd
commit 5542bb3425
1 changed files with 5 additions and 1 deletions

View File

@ -38,7 +38,11 @@ public abstract class DynamicSelection<T> implements ISelection<T> {
return currentValue;
} else {
Iterator<? extends T> i = getSelections().keySet().iterator();
return i.next();
if (i.hasNext()) {
return i.next();
} else {
return null;
}
}
}