Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8af7939 authored by satok's avatar satok Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE in SuggestedWords"

parents 04df2bca f088204a
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -87,8 +87,9 @@ public class SuggestedWords {
            final CompletionInfo[] infos) {
        final ArrayList<SuggestedWordInfo> result = new ArrayList<SuggestedWordInfo>();
        for (CompletionInfo info : infos) {
            if (null != info) result.add(new SuggestedWordInfo(info.getText(),
                    SuggestedWordInfo.MAX_SCORE));
            if (null != info && info.getText() != null) {
                result.add(new SuggestedWordInfo(info.getText(), SuggestedWordInfo.MAX_SCORE));
            }
        }
        return result;
    }