Fix for NPE in saveWordInHistory
Bug: 2898207
This commit is contained in:
parent
d31d814c58
commit
6dea425480
1 changed files with 5 additions and 0 deletions
|
@ -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 a new issue