Fix crash when the layout has less than 3 rows

This commit is contained in:
Jules Aguillon 2023-06-28 17:50:32 +02:00
parent c0833de37c
commit 434f9aaf2d

View File

@ -104,7 +104,7 @@ class KeyboardData
private static void addExtraKeys_to_row(ArrayList<Row> rows, final Iterator<KeyValue> extra_keys, int row_i, final int d) private static void addExtraKeys_to_row(ArrayList<Row> rows, final Iterator<KeyValue> extra_keys, int row_i, final int d)
{ {
if (!extra_keys.hasNext()) if (!extra_keys.hasNext() || row_i >= rows.size())
return; return;
rows.set(row_i, rows.get(row_i).mapKeys(new MapKey(){ rows.set(row_i, rows.get(row_i).mapKeys(new MapKey(){
public Key apply(Key k) { public Key apply(Key k) {