Avoid null dereference on accessibility morekeys

This commit is contained in:
Aleksandras Kostarevas 2024-05-28 21:00:50 +03:00
parent c1b31987d3
commit 60bc8a2d1d

View File

@ -214,7 +214,7 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel
if (newKey == oldKey) {
return newKey;
} else {
if(mAccessibilityDelegate != null && AccessibilityUtils.getInstance().isAccessibilityEnabled()) {
if(mAccessibilityDelegate != null && AccessibilityUtils.getInstance().isAccessibilityEnabled() && newKey != null) {
mAccessibilityDelegate.onKeyHovered(newKey);
}
}