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

Commit 4e03e611 authored by Annie Chin's avatar Annie Chin
Browse files

Null-check selected alarm before setting ringtone.

Bug: 24291458
Change-Id: I0ee8b95cd41e3284900db062560aace918fa1b30
parent f489b546
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -238,6 +238,10 @@ public final class AlarmClockFragment extends DeskClockFragment implements

                // Set the ringtone uri on the alarm.
                final Alarm alarm = mAlarmTimeClickHandler.getSelectedAlarm();
                if (alarm == null) {
                    LogUtils.e("Could not get selected alarm to set ringtone");
                    return;
                }
                alarm.alert = uri;

                // Save the change to alarm.