Merge "Fix NPE"

This commit is contained in:
Kurt Partridge 2013-04-17 20:33:25 +00:00 committed by Android (Google) Code Review
commit a5bfac5bec

View File

@ -894,7 +894,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
// Check that expected word matches.
if (oldLogUnit != null) {
final String oldLogUnitWord = oldLogUnit.getWord();
if (!oldLogUnitWord.equals(expectedWord)) {
if (oldLogUnitWord != null && !oldLogUnitWord.equals(expectedWord)) {
return;
}
}