mirror of
https://github.com/sojamo/controlp5
synced 2024-11-22 14:07:55 +01:00
Merge branch 'frankiezafe-dev' into dev-2.2.7
quick fix on ListBox:onRelease index out of range error
This commit is contained in:
commit
fa0aacdfd1
@ -132,6 +132,11 @@ public class ListBox extends Controller< ListBox > implements ControlListener {
|
||||
// n += itemRange; /* UP */
|
||||
int index = ( int ) n + itemIndexOffset;
|
||||
|
||||
if ( index < 0 || index >= items.size() ) {
|
||||
// no need to go further, there is something wrong in the position process
|
||||
return;
|
||||
}
|
||||
|
||||
Map m = items.get( index );
|
||||
|
||||
switch ( _myType ) {
|
||||
|
Loading…
Reference in New Issue
Block a user