diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java index 4886cc3..a68b954 100644 --- a/srcs/juloo.keyboard2/Keyboard2.java +++ b/srcs/juloo.keyboard2/Keyboard2.java @@ -157,6 +157,8 @@ public class Keyboard2 extends InputMethodService // Android might return a random subtype, for example, the first in the // list alphabetically. InputMethodSubtype current_subtype = imm.getCurrentInputMethodSubtype(); + if (current_subtype == null) + return null; for (InputMethodSubtype s : enabled_subtypes) if (s.getLanguageTag().equals(current_subtype.getLanguageTag())) return s;