Merge "Fix NPE in SuggestedWords"
commit
d8af793983
|
@ -87,8 +87,9 @@ public class SuggestedWords {
|
||||||
final CompletionInfo[] infos) {
|
final CompletionInfo[] infos) {
|
||||||
final ArrayList<SuggestedWordInfo> result = new ArrayList<SuggestedWordInfo>();
|
final ArrayList<SuggestedWordInfo> result = new ArrayList<SuggestedWordInfo>();
|
||||||
for (CompletionInfo info : infos) {
|
for (CompletionInfo info : infos) {
|
||||||
if (null != info) result.add(new SuggestedWordInfo(info.getText(),
|
if (null != info && info.getText() != null) {
|
||||||
SuggestedWordInfo.MAX_SCORE));
|
result.add(new SuggestedWordInfo(info.getText(), SuggestedWordInfo.MAX_SCORE));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue