Fix null in android text entry system.

This commit is contained in:
Jason Knight 2023-04-12 09:20:44 -06:00
parent 632a544c6e
commit cec8e09948

View File

@ -124,11 +124,12 @@ public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListene
public boolean onEditorAction(final TextView pTextView, final int pActionID, final KeyEvent pKeyEvent) {
if (this.mEdit == pTextView && this.isFullScreenEdit() && pKeyEvent != null) {
final String characters = pKeyEvent.getCharacters();
for (int i = 0; i < characters.length(); i++) {
final int ch = characters.codePointAt(i);
GodotLib.key(ch, 0, ch, true);
GodotLib.key(ch, 0, ch, false);
if (characters != null) {
for (int i = 0; i < characters.length(); i++) {
final int ch = characters.codePointAt(i);
GodotLib.key(ch, 0, ch, true);
GodotLib.key(ch, 0, ch, false);
}
}
}