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:
@@ -39,6 +39,11 @@ void timer_process()
|
|||||||
|
|
||||||
for (c = 0; c < timers_present; c++)
|
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;
|
enable[c] = *timers[c].enable;
|
||||||
if (*timers[c].enable)
|
if (*timers[c].enable)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user