diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java index ccc4be5..bb51999 100644 --- a/srcs/juloo.keyboard2/Keyboard2.java +++ b/srcs/juloo.keyboard2/Keyboard2.java @@ -147,8 +147,16 @@ public class Keyboard2 extends InputMethodService else { InputMethodSubtype subtype = imm.getCurrentInputMethodSubtype(); - refreshSubtypeLayout(subtype); - refreshAccentsOption(imm, subtype); + if (subtype == null) + { + // On some rare cases, [subtype] is null. + refreshSubtypeLegacyFallback(); + } + else + { + refreshSubtypeLayout(subtype); + refreshAccentsOption(imm, subtype); + } } _config.shouldOfferSwitchingToProgramming = _config.programming_layout != -1 &&