abouttreesummaryrefslogcommitdiff
path: root/srcs
diff options
context:
space:
mode:
authorJules Aguillon2022-07-30 18:19:28 +0200
committerJules Aguillon2022-07-30 18:19:28 +0200
commitbc8bcce82a3fac5ef6f6483d9922f7c644ad1b52 (patch)
tree301304364ba9b942091aa7a950f631578102e405 /srcs
parent4f5ce6634780520391bec039977119562e208516 (diff)
downloadunexpected-keyboard-bc8bcce82a3fac5ef6f6483d9922f7c644ad1b52.tar.gz
unexpected-keyboard-bc8bcce82a3fac5ef6f6483d9922f7c644ad1b52.zip
Fix crash when auto-capitalisation runs too soon
This is unexpected but happens once.
Diffstat (limited to 'srcs')
-rw-r--r--srcs/juloo.keyboard2/Keyboard2View.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java
index 5ae2b06..422548a 100644
--- a/srcs/juloo.keyboard2/Keyboard2View.java
+++ b/srcs/juloo.keyboard2/Keyboard2View.java
@@ -93,6 +93,8 @@ public class Keyboard2View extends View
/** Called by auto-capitalisation. */
public void set_shift_state(boolean state)
{
+ if (_keyboard == null)
+ return;
KeyValue shift = KeyValue.getKeyByName("shift");
KeyboardData.Key key = _keyboard.findKeyWithValue(shift);
if (key == null)