mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix a NPE
Bug: 18451316 Change-Id: Ia20bf388471f84c963354df050182e722d966a02
This commit is contained in:
parent
7cca01aa1d
commit
0e00f5fe3a
@ -266,6 +266,12 @@ public class DictionaryFacilitator {
|
||||
}
|
||||
final DictionaryGroup newMostProbableDictionaryGroup =
|
||||
findDictionaryGroupWithLocale(mDictionaryGroups, locale);
|
||||
if (null == newMostProbableDictionaryGroup) {
|
||||
// It seems this may happen as a race condition; pressing the globe key and space
|
||||
// in quick succession could commit a word out of a dictionary that's not in the
|
||||
// facilitator any more. In this case, just not changing things is fine.
|
||||
return;
|
||||
}
|
||||
mMostProbableDictionaryGroup.mWeightForTypingInLocale =
|
||||
DictionaryGroup.WEIGHT_FOR_TYPING_IN_NOT_MOST_PROBABLE_LANGUAGE;
|
||||
mMostProbableDictionaryGroup.mWeightForGesturingInLocale =
|
||||
|
Loading…
Reference in New Issue
Block a user