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

Commit 93640fa2 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Avoid NPE in isEmpty() when no EditFields defined.

parent 05fc2e76
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -409,6 +409,9 @@ public class EntityModifier {
     * terms of {@link DataKind#fieldList}.
     */
    public static boolean isEmpty(ValuesDelta values, DataKind kind) {
        // No defined fields mean this row is always empty
        if (kind.fieldList == null) return true;

        boolean hasValues = false;
        for (EditField field : kind.fieldList) {
            // If any field has values, we're not empty