Don't enable RTC clock on speed change if RTC timer not enabled. Fixes crash when changing configuration with XT models.

This commit is contained in:
SarahW 2019-04-26 09:02:55 +01:00
commit 58e42fda81

View file

@ -65,6 +65,11 @@ void nvr_recalc()
{
int c;
if (!(nvrram[RTC_REGA] & RTC_RS))
{
timer_disable(&rtc_timer);
return;
}
c = 1 << ((nvrram[RTC_REGA] & RTC_RS) - 1);
timer_set_delay_u64(&rtc_timer, (uint64_t)(RTCCONST * c));
}