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

Commit bb9a8e08 authored by Satoshi Kataoka's avatar Satoshi Kataoka Committed by Android Git Automerger
Browse files

am f463b45d: Merge "Fix Possible NPE"

* commit 'f463b45d':
  Fix Possible NPE
parents e42522f3 f463b45d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -207,7 +207,12 @@ public final class UserHistoryDictIOUtils {
            final ArrayList<PendingAttribute> attrList = bigrams.get(entry.getKey());
            if (attrList != null) {
                for (final PendingAttribute attr : attrList) {
                    to.setBigram(word1, unigrams.get(attr.mAddress),
                    final String word2 = unigrams.get(attr.mAddress);
                    if (word1 == null || word2 == null) {
                        Log.e(TAG, "Invalid bigram pair detected: " + word1 + ", " + word2);
                        continue;
                    }
                    to.setBigram(word1, word2,
                            BinaryDictInputOutput.reconstructBigramFrequency(unigramFrequency,
                                    attr.mFrequency));
                }