diff --git a/apps/sched/ChangeLog b/apps/sched/ChangeLog index ae931e99e..634250d48 100644 --- a/apps/sched/ChangeLog +++ b/apps/sched/ChangeLog @@ -20,4 +20,5 @@ 0.17: Fix midnight in local timezone (alarms wouldn't always fire as expected in timezone != 0) 0.18: Update clock_info to avoid a redraw 0.19: Update clock_info to refresh periodically on active alarms/timers -0.20: Alarm dismiss and snooze events \ No newline at end of file +0.20: Alarm dismiss and snooze events +0.21: Fix crash in clock_info diff --git a/apps/sched/clkinfo.js b/apps/sched/clkinfo.js index b778bf970..89402ea67 100644 --- a/apps/sched/clkinfo.js +++ b/apps/sched/clkinfo.js @@ -118,8 +118,8 @@ this.switchTimeout = _doSwitchTimeout.call(this, a, switchTimeout); }, hide: function() { - clearInterval(this.interval); - clearTimeout(this.switchTimeout); + if (this.interval) clearInterval(this.interval); + if (this.switchTimeout) clearTimeout(this.switchTimeout); this.interval = undefined; this.switchTimeout = undefined; }, diff --git a/apps/sched/metadata.json b/apps/sched/metadata.json index a56cec042..2a1b0f8ca 100644 --- a/apps/sched/metadata.json +++ b/apps/sched/metadata.json @@ -1,7 +1,7 @@ { "id": "sched", "name": "Scheduler", - "version": "0.20", + "version": "0.21", "description": "Scheduling library for alarms and timers", "icon": "app.png", "type": "scheduler",