commit | 4e03e611ace046be963e76c5013ce612833455d0 | [log] [tgz] |
---|---|---|
author | Annie Chin <afchin@google.com> | Tue Sep 22 15:19:02 2015 -0700 |
committer | Annie Chin <afchin@google.com> | Tue Sep 22 15:19:02 2015 -0700 |
tree | a8cb70490877a978b760424bf6c14d7f076a1ed3 | |
parent | f489b546a12af39bcdb21ee8ee18d1527eb8922b [diff] |
Null-check selected alarm before setting ringtone. Bug: 24291458 Change-Id: I0ee8b95cd41e3284900db062560aace918fa1b30
diff --git a/src/com/android/deskclock/AlarmClockFragment.java b/src/com/android/deskclock/AlarmClockFragment.java index 220f137..d443ba5 100644 --- a/src/com/android/deskclock/AlarmClockFragment.java +++ b/src/com/android/deskclock/AlarmClockFragment.java
@@ -238,6 +238,10 @@ // 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.