From acafc073b911fd4125c487431748be4d25e2b560 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Thu, 1 Nov 2012 12:36:40 +0900 Subject: [PATCH] Fix an NPE in recent code Change-Id: I5c76edff5c3c250167d425a737b09b10e25f9f84 --- .../src/com/android/inputmethod/latin/dicttool/Diff.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Diff.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Diff.java index 855c026b9..af92ea3ad 100644 --- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Diff.java +++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Diff.java @@ -144,7 +144,9 @@ public class Diff extends Dicttool.Command { System.out.println("Bigram removed: " + word + " " + attribute0.mWord + " " + attribute0.mFrequency); } - } else if (null != list0) { + return; + } + if (null != list0) { for (final WeightedString attribute0 : list0) { // The following tests with #equals(). The WeightedString#equals() method returns // true if both the string and the frequency are the same.