Prevent possible NPE in android.gesture.Learner
Change-Id: If9b0ac9a05b6736719d84c6b58be73e3f7771f07
This commit is contained in:
@ -72,7 +72,8 @@ abstract class Learner {
|
||||
for (int i = 0; i < count; i++) {
|
||||
final Instance instance = instances.get(i);
|
||||
// the label can be null, as specified in Instance
|
||||
if ((instance.label == null && name == null) || instance.label.equals(name)) {
|
||||
if ((instance.label == null && name == null)
|
||||
|| (instance.label != null && instance.label.equals(name))) {
|
||||
toDelete.add(instance);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user