解决伪任务项未初始化timer,导致引用了空指针的问题!

This commit is contained in:
魔罗技术 2020-09-28 21:38:22 +08:00
parent 11828db7c6
commit bbe1443b58

View File

@ -10,6 +10,8 @@
* 2016-06-24 Morro
* 2020-05-23 Morro ,
* 2020-06-28 Morro is_timeout超时判断接口
* 2020-09-28 Morro timer
*
******************************************************************************/
#include "module.h"
@ -87,7 +89,7 @@ void module_task_init(void)
void module_task_process(void)
{
const task_item_t *t;
for (t = &task_tbl_start; t < &task_tbl_end; t++) {
for (t = &task_tbl_start + 1; t < &task_tbl_end; t++) {
if ((get_tick() - *t->timer) >= t->interval) {
*t->timer = get_tick();
t->handle();