adding a crashfix
This commit is contained in:
parent
422f7dd1c8
commit
9513e11e0f
|
@ -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 New Issue