do not crash on pressing the empty space near A or L

This commit is contained in:
tibbi 2022-01-21 18:56:19 +01:00
parent 7457808c49
commit e69a48aa0f
1 changed files with 1 additions and 1 deletions

View File

@ -1224,7 +1224,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
detectAndSendKey(mCurrentKey, touchX, touchY, eventTime) detectAndSendKey(mCurrentKey, touchX, touchY, eventTime)
} }
if (mKeys[mCurrentKey].codes.firstOrNull() == MyKeyboard.KEYCODE_SPACE && !mIsLongPressingSpace) { if (mKeys.getOrNull(mCurrentKey)?.codes?.firstOrNull() == MyKeyboard.KEYCODE_SPACE && !mIsLongPressingSpace) {
detectAndSendKey(mCurrentKey, touchX, touchY, eventTime) detectAndSendKey(mCurrentKey, touchX, touchY, eventTime)
} }