Timers, whose enable and/or count pointers are NULL, are now ignored by timer_process(), should fix the random crashes on hard reset.

This commit is contained in:
OBattler
2017-05-29 01:59:12 +02:00
parent f416613cfa
commit 40f7c88982

View File

@@ -39,6 +39,11 @@ void timer_process()
for (c = 0; c < timers_present; c++)
{
/* This is needed to avoid timer crashes on hard reset. */
if ((timers[c].enable == NULL) || (timers[c].count == NULL))
{
continue;
}
enable[c] = *timers[c].enable;
if (*timers[c].enable)
{