fixed a potential crash when trying to highlight invalid words
This commit is contained in:
parent
d32bc12098
commit
37abc2bbc4
1 changed files with 5 additions and 0 deletions
|
|
@ -285,6 +285,11 @@ public class TextField {
|
|||
return word;
|
||||
}
|
||||
|
||||
// nothing to highlight in an empty word
|
||||
if (word == null || word.length() == 0) {
|
||||
return word;
|
||||
}
|
||||
|
||||
SpannableString styledWord = new SpannableString(word);
|
||||
|
||||
// default underline style
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue