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

Commit 7bcdf514 authored by Jay Shrauner's avatar Jay Shrauner
Browse files

Fix NPE when event type is unset

Bug:21443668
Change-Id: Ia0623a9cf9b379b882b661ab989195ba5ac91ac6
parent 11708263
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ public class EventFieldEditorView extends LabeledEditorView {
        final int defaultYear = calendar.get(Calendar.YEAR);

        // Check whether the year is optional
        final boolean isYearOptional = getType().isYearOptional();
        final boolean isYearOptional = getType() != null && getType().isYearOptional();

        if (!isYearOptional && !TextUtils.isEmpty(oldValue)) {
            final ParsePosition position = new ParsePosition(0);