mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix for NPE in saveWordInHistory
Bug: 2898207
This commit is contained in:
parent
d31d814c58
commit
6dea425480
@ -1394,6 +1394,11 @@ public class LatinIME extends InputMethodService
|
||||
mWord.reset();
|
||||
return;
|
||||
}
|
||||
// Skip if result is null. It happens in some edge case.
|
||||
if (TextUtils.isEmpty(result)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Make a copy of the CharSequence, since it is/could be a mutable CharSequence
|
||||
final String resultCopy = result.toString();
|
||||
TypedWordAlternatives entry = new TypedWordAlternatives(resultCopy,
|
||||
|
Loading…
Reference in New Issue
Block a user