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

Commit 9a686b5c authored by Kenny Root's avatar Kenny Root Committed by Android (Google) Code Review
Browse files

Merge "Prevent possible NPE in android.gesture.Learner"

parents c6a0a9cb ea46dea9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);
            }
        }