adding a crashfix
This commit is contained in:
parent
422f7dd1c8
commit
9513e11e0f
1 changed files with 4 additions and 2 deletions
|
@ -1122,8 +1122,10 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||
showPreview(secondKeyIndex)
|
||||
detectAndSendKey(secondKeyIndex, newPointerX, newPointerY, eventTime)
|
||||
|
||||
val secondKeyCode = mKeys[secondKeyIndex].code
|
||||
mOnKeyboardActionListener!!.onPress(secondKeyCode)
|
||||
val secondKeyCode = mKeys.getOrNull(secondKeyIndex)?.code
|
||||
if (secondKeyCode != null) {
|
||||
mOnKeyboardActionListener!!.onPress(secondKeyCode)
|
||||
}
|
||||
|
||||
showPreview(NOT_A_KEY)
|
||||
invalidateKey(mCurrentKey)
|
||||
|
|
Loading…
Reference in a new issue