adding a crashfix

This commit is contained in:
tibbi 2022-02-10 10:11:04 +01:00
parent 422f7dd1c8
commit 9513e11e0f
1 changed files with 4 additions and 2 deletions

View File

@ -1122,8 +1122,10 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
showPreview(secondKeyIndex)
detectAndSendKey(secondKeyIndex, newPointerX, newPointerY, eventTime)
val secondKeyCode = mKeys[secondKeyIndex].code
val secondKeyCode = mKeys.getOrNull(secondKeyIndex)?.code
if (secondKeyCode != null) {
mOnKeyboardActionListener!!.onPress(secondKeyCode)
}
showPreview(NOT_A_KEY)
invalidateKey(mCurrentKey)