From e32e0af40f64a4f631721db18e63b306b155bfc5 Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 20 Apr 2023 23:46:17 +0200 Subject: [PATCH] Ported: Fix null in android text entry system. - jasonwinterpixel https://github.com/godotengine/godot/commit/cec8e09948b71a0f56ce2dc53960cfe799a83f22 --- .../pandemonium/input/PandemoniumTextInputWrapper.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/platform/android/java/lib/src/net/relintai/pandemonium/pandemonium/input/PandemoniumTextInputWrapper.java b/platform/android/java/lib/src/net/relintai/pandemonium/pandemonium/input/PandemoniumTextInputWrapper.java index 54631e15a..c8f0af120 100644 --- a/platform/android/java/lib/src/net/relintai/pandemonium/pandemonium/input/PandemoniumTextInputWrapper.java +++ b/platform/android/java/lib/src/net/relintai/pandemonium/pandemonium/input/PandemoniumTextInputWrapper.java @@ -125,10 +125,12 @@ public class PandemoniumTextInputWrapper implements TextWatcher, OnEditorActionL 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); - PandemoniumLib.key(ch, 0, ch, true); - PandemoniumLib.key(ch, 0, ch, false); + if (characters != null) { + for (int i = 0; i < characters.length(); i++) { + final int ch = characters.codePointAt(i); + PandemoniumLib.key(ch, 0, ch, true); + PandemoniumLib.key(ch, 0, ch, false); + } } }